diff options
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r-- | server/helpers/express-utils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index ba23557ba..c0d3f8f32 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -7,6 +7,7 @@ import { extname } from 'path' | |||
7 | import { isArray } from './custom-validators/misc' | 7 | import { isArray } from './custom-validators/misc' |
8 | import { CONFIG } from '../initializers/config' | 8 | import { CONFIG } from '../initializers/config' |
9 | import { getExtFromMimetype } from './video' | 9 | import { getExtFromMimetype } from './video' |
10 | import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes' | ||
10 | 11 | ||
11 | function buildNSFWFilter (res?: express.Response, paramNSFW?: string) { | 12 | function buildNSFWFilter (res?: express.Response, paramNSFW?: string) { |
12 | if (paramNSFW === 'true') return true | 13 | if (paramNSFW === 'true') return true |
@@ -61,7 +62,9 @@ function getHostWithPort (host: string) { | |||
61 | } | 62 | } |
62 | 63 | ||
63 | function badRequest (req: express.Request, res: express.Response) { | 64 | function badRequest (req: express.Request, res: express.Response) { |
64 | return res.type('json').status(400).end() | 65 | return res.type('json') |
66 | .status(HttpStatusCode.BAD_REQUEST_400) | ||
67 | .end() | ||
65 | } | 68 | } |
66 | 69 | ||
67 | function createReqFiles ( | 70 | function createReqFiles ( |