diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-04 08:46:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-04 08:46:54 +0900 |
| commit | d4a630902d8d250b67fcd0ce2b49240786b40368 (patch) | |
| tree | b87395691e52e3b86ce40196993d492c694c5e79 /src/server/api/api-handler.ts | |
| parent | enhance(server): Log error message when internal error occured (diff) | |
| download | sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.gz sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.bz2 sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.zip | |
refactor: Use ===
Diffstat (limited to 'src/server/api/api-handler.ts')
| -rw-r--r-- | src/server/api/api-handler.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts index b147bca143..7fbc200fc0 100644 --- a/src/server/api/api-handler.ts +++ b/src/server/api/api-handler.ts @@ -34,7 +34,7 @@ export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise((res) => { call(endpoint.name, user, app, body, (ctx as any).file).then((res: any) => { reply(res); }).catch((e: ApiError) => { - reply(e.httpStatusCode ? e.httpStatusCode : e.kind == 'client' ? 400 : 500, e); + reply(e.httpStatusCode ? e.httpStatusCode : e.kind === 'client' ? 400 : 500, e); }); }).catch(() => { reply(403, new ApiError({ |