From 7ffd9d6df9a89ee2351864b4f7619fa3d9cb239c Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 May 2019 13:00:36 +0900 Subject: [PATCH] Better deninition --- src/server/api/endpoints/users/groups/transfer.ts | 7 +++++++ src/server/api/endpoints/users/groups/update.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/server/api/endpoints/users/groups/transfer.ts b/src/server/api/endpoints/users/groups/transfer.ts index ca0ab9ab2..b4284ab48 100644 --- a/src/server/api/endpoints/users/groups/transfer.ts +++ b/src/server/api/endpoints/users/groups/transfer.ts @@ -4,6 +4,7 @@ import define from '../../../define'; import { ApiError } from '../../../error'; import { getUser } from '../../../common/getters'; import { UserGroups, UserGroupJoinings } from '../../../../../models'; +import { types, bool } from '../../../../../misc/schema'; export const meta = { desc: { @@ -31,6 +32,12 @@ export const meta = { }, }, + res: { + type: types.object, + optional: bool.false, nullable: bool.false, + ref: 'UserGroup', + }, + errors: { noSuchGroup: { message: 'No such group.', diff --git a/src/server/api/endpoints/users/groups/update.ts b/src/server/api/endpoints/users/groups/update.ts index ad9a1faa2..bc974621a 100644 --- a/src/server/api/endpoints/users/groups/update.ts +++ b/src/server/api/endpoints/users/groups/update.ts @@ -3,6 +3,7 @@ import { ID } from '../../../../../misc/cafy-id'; import define from '../../../define'; import { ApiError } from '../../../error'; import { UserGroups } from '../../../../../models'; +import { types, bool } from '../../../../../misc/schema'; export const meta = { desc: { @@ -34,6 +35,12 @@ export const meta = { } }, + res: { + type: types.object, + optional: bool.false, nullable: bool.false, + ref: 'UserGroup', + }, + errors: { noSuchGroup: { message: 'No such group.',