Add group update / transfer API

This commit is contained in:
Satsuki Yanagi 2019-05-22 05:06:52 +09:00
parent a973bd56fe
commit 1092818203
8 changed files with 240 additions and 6 deletions

View file

@ -21,6 +21,7 @@ export class UserGroupRepository extends Repository<UserGroup> {
id: userGroup.id,
createdAt: userGroup.createdAt.toISOString(),
name: userGroup.name,
owner: userGroup.userId,
userIds: users.map(x => x.userId)
};
}
@ -48,6 +49,11 @@ export const packedUserGroupSchema = {
optional: bool.false, nullable: bool.false,
description: 'The name of the UserGroup.'
},
owner: {
type: types.string,
nullable: bool.false, optional: bool.false,
format: 'id',
},
userIds: {
type: types.array,
nullable: bool.false, optional: bool.true,