diff options
| author | Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> | 2019-05-05 09:27:55 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-05-05 09:27:55 +0900 |
| commit | 5fb0a995dd2d9cf65ed93fca78502f42a7c3e22d (patch) | |
| tree | ba41be9daaf91435ff4429667a6bbcbe094a39c5 /src/server/api | |
| parent | ログアウトの処理と外部サービス連携Viewがセッションク... (diff) | |
| download | sharkey-5fb0a995dd2d9cf65ed93fca78502f42a7c3e22d.tar.gz sharkey-5fb0a995dd2d9cf65ed93fca78502f42a7c3e22d.tar.bz2 sharkey-5fb0a995dd2d9cf65ed93fca78502f42a7c3e22d.zip | |
様々な修正 (#4859)
Typo, Redundant code, Syntax error の修正
Diffstat (limited to 'src/server/api')
| -rw-r--r-- | src/server/api/endpoints/drive/files.ts | 2 | ||||
| -rw-r--r-- | src/server/api/endpoints/drive/stream.ts | 2 | ||||
| -rw-r--r-- | src/server/api/index.ts | 2 | ||||
| -rw-r--r-- | src/server/api/openapi/schemas.ts | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index 493e14464c..d10c2a3ef4 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -37,7 +37,7 @@ export const meta = { }, type: { - validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/) + validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/) } }, diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index db17979a4b..f75c4273c3 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -27,7 +27,7 @@ export const meta = { }, type: { - validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/) + validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/) } }, diff --git a/src/server/api/index.ts b/src/server/api/index.ts index 8c2b97775f..49500b2b4a 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -52,7 +52,7 @@ for (const endpoint of endpoints) { } else { if (endpoint.name.includes('-')) { // 後方互換性のため - router.post(`/${endpoint.name.replace(/\-/g, '_')}`, handler.bind(null, endpoint)); + router.post(`/${endpoint.name.replace(/-/g, '_')}`, handler.bind(null, endpoint)); } router.post(`/${endpoint.name}`, handler.bind(null, endpoint)); } diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index 229d10af2a..628bba511f 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -18,7 +18,7 @@ export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; if (schema.type === 'object' && schema.properties) { - res.required = Object.entries(schema.properties).filter(([k, v]) => v.optional !== true).map(([k]) => k); + res.required = Object.entries(schema.properties).filter(([k, v]) => !v.optional).map(([k]) => k); for (const k of Object.keys(schema.properties)) { res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]); |