diff options
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r-- | server/helpers/express-utils.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index 5bf1e1a5f..76440348f 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -5,8 +5,10 @@ import { logger } from './logger' | |||
5 | import { User } from '../../shared/models/users' | 5 | import { User } from '../../shared/models/users' |
6 | import { generateRandomString } from './utils' | 6 | import { generateRandomString } from './utils' |
7 | 7 | ||
8 | function buildNSFWFilter (res: express.Response, paramNSFW?: boolean) { | 8 | function buildNSFWFilter (res: express.Response, paramNSFW?: string) { |
9 | if (paramNSFW === true || paramNSFW === false) return paramNSFW | 9 | if (paramNSFW === 'true') return true |
10 | if (paramNSFW === 'false') return false | ||
11 | if (paramNSFW === 'both') return undefined | ||
10 | 12 | ||
11 | if (res.locals.oauth) { | 13 | if (res.locals.oauth) { |
12 | const user: User = res.locals.oauth.token.User | 14 | const user: User = res.locals.oauth.token.User |