summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/auth/session/generate.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-04-23 22:35:26 +0900
committerGitHub <noreply@github.com>2019-04-23 22:35:26 +0900
commit0463c6bb0f8fd32740ceb61ccce04c662272a618 (patch)
treea28cbdf6c9cdc14648b8c0e46248665a3ad7e5af /src/server/api/endpoints/auth/session/generate.ts
parentFix #4768 (diff)
downloadsharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.tar.gz
sharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.tar.bz2
sharkey-0463c6bb0f8fd32740ceb61ccce04c662272a618.zip
Refactor API (#4770)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update description.ts * wip
Diffstat (limited to 'src/server/api/endpoints/auth/session/generate.ts')
-rw-r--r--src/server/api/endpoints/auth/session/generate.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/server/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts
index bca8d33483..9bf27c8e77 100644
--- a/src/server/api/endpoints/auth/session/generate.ts
+++ b/src/server/api/endpoints/auth/session/generate.ts
@@ -5,12 +5,13 @@ import define from '../../../define';
import { ApiError } from '../../../error';
import { Apps, AuthSessions } from '../../../../../models';
import { genId } from '../../../../../misc/gen-id';
+import { types, bool } from '../../../../../misc/schema';
export const meta = {
tags: ['auth'],
requireCredential: false,
-
+
desc: {
'ja-JP': 'アプリを認証するためのトークンを作成します。',
'en-US': 'Generate a token for authorize application.'
@@ -27,14 +28,18 @@ export const meta = {
},
res: {
- type: 'object',
+ type: types.object,
+ optional: bool.false, nullable: bool.false,
properties: {
token: {
- type: 'string',
+ type: types.string,
+ optional: bool.false, nullable: bool.false,
description: 'セッションのトークン'
},
url: {
- type: 'string',
+ type: types.string,
+ optional: bool.false, nullable: bool.false,
+ format: 'url',
description: 'セッションのURL'
},
}