1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-09-01 04:47:00 +00:00

Use transaction when creating a new group.

De-duplicate in getting groups with ancestors.
This commit is contained in:
cuihaikuo
2018-04-04 16:12:12 +08:00
parent b98c73ba23
commit 3a8f175fa8
4 changed files with 125 additions and 59 deletions

View File

@@ -1145,7 +1145,7 @@ ccnet_rpc_quit_group (int group_id, const char *user_name, GError **error)
}
GList *
ccnet_rpc_get_groups (const char *username, gboolean return_ancestors, GError **error)
ccnet_rpc_get_groups (const char *username, int return_ancestors, GError **error)
{
CcnetGroupManager *group_mgr =
((CcnetServerSession *)session)->group_mgr;
@@ -1157,7 +1157,8 @@ ccnet_rpc_get_groups (const char *username, gboolean return_ancestors, GError **
return NULL;
}
ret = ccnet_group_manager_get_groups_by_user (group_mgr, username, return_ancestors, error);
ret = ccnet_group_manager_get_groups_by_user (group_mgr, username,
return_ancestors ? TRUE : FALSE, error);
return ret;
}