Move config in its own file

This commit is contained in:
Chocobozzz 2019-04-11 11:33:44 +02:00
parent 2c3abc4fa7
commit 6dd9de95df
No known key found for this signature in database
GPG key ID: 583A612D890159BE
79 changed files with 523 additions and 458 deletions

View file

@ -1,10 +1,11 @@
import * as express from 'express'
import * as multer from 'multer'
import { CONFIG, REMOTE_SCHEME } from '../initializers'
import { REMOTE_SCHEME } from '../initializers'
import { logger } from './logger'
import { deleteFileAsync, generateRandomString } from './utils'
import { extname } from 'path'
import { isArray } from './custom-validators/misc'
import { CONFIG } from '../initializers/config'
function buildNSFWFilter (res?: express.Response, paramNSFW?: string) {
if (paramNSFW === 'true') return true
@ -58,7 +59,7 @@ function getHostWithPort (host: string) {
return host
}
function badRequest (req: express.Request, res: express.Response, next: express.NextFunction) {
function badRequest (req: express.Request, res: express.Response) {
return res.type('json').status(400).end()
}