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, 3 insertions, 2 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts
index fef2da313..2b574ab8e 100644
--- a/server/helpers/express-utils.ts
+++ b/server/helpers/express-utils.ts
@@ -1,10 +1,11 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as multer from 'multer' 2import * as multer from 'multer'
3import { CONFIG, REMOTE_SCHEME } from '../initializers' 3import { REMOTE_SCHEME } from '../initializers'
4import { logger } from './logger' 4import { logger } from './logger'
5import { deleteFileAsync, generateRandomString } from './utils' 5import { deleteFileAsync, generateRandomString } from './utils'
6import { extname } from 'path' 6import { extname } from 'path'
7import { isArray } from './custom-validators/misc' 7import { isArray } from './custom-validators/misc'
8import { CONFIG } from '../initializers/config'
8 9
9function buildNSFWFilter (res?: express.Response, paramNSFW?: string) { 10function buildNSFWFilter (res?: express.Response, paramNSFW?: string) {
10 if (paramNSFW === 'true') return true 11 if (paramNSFW === 'true') return true
@@ -58,7 +59,7 @@ function getHostWithPort (host: string) {
58 return host 59 return host
59} 60}
60 61
61function badRequest (req: express.Request, res: express.Response, next: express.NextFunction) { 62function badRequest (req: express.Request, res: express.Response) {
62 return res.type('json').status(400).end() 63 return res.type('json').status(400).end()
63} 64}
64 65