aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/express-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r--server/helpers/express-utils.ts5
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'
7import { isArray } from './custom-validators/misc' 7import { isArray } from './custom-validators/misc'
8import { CONFIG } from '../initializers/config' 8import { CONFIG } from '../initializers/config'
9import { getExtFromMimetype } from './video' 9import { getExtFromMimetype } from './video'
10import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes'
10 11
11function buildNSFWFilter (res?: express.Response, paramNSFW?: string) { 12function 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
63function badRequest (req: express.Request, res: express.Response) { 64function 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
67function createReqFiles ( 70function createReqFiles (