diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/express-utils.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index 9cf8fbeac..8a9cee8c5 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -6,6 +6,7 @@ import { User } from '../../shared/models/users' | |||
6 | import { deleteFileAsync, generateRandomString } from './utils' | 6 | import { deleteFileAsync, generateRandomString } from './utils' |
7 | import { extname } from 'path' | 7 | import { extname } from 'path' |
8 | import { isArray } from './custom-validators/misc' | 8 | import { isArray } from './custom-validators/misc' |
9 | import { UserModel } from '../models/account/user' | ||
9 | 10 | ||
10 | function buildNSFWFilter (res: express.Response, paramNSFW?: string) { | 11 | function buildNSFWFilter (res: express.Response, paramNSFW?: string) { |
11 | if (paramNSFW === 'true') return true | 12 | if (paramNSFW === 'true') return true |
@@ -13,7 +14,7 @@ function buildNSFWFilter (res: express.Response, paramNSFW?: string) { | |||
13 | if (paramNSFW === 'both') return undefined | 14 | if (paramNSFW === 'both') return undefined |
14 | 15 | ||
15 | if (res.locals.oauth) { | 16 | if (res.locals.oauth) { |
16 | const user: User = res.locals.oauth.token.User | 17 | const user: UserModel = res.locals.oauth.token.User |
17 | 18 | ||
18 | // User does not want NSFW videos | 19 | // User does not want NSFW videos |
19 | if (user.nsfwPolicy === 'do_not_list') return false | 20 | if (user.nsfwPolicy === 'do_not_list') return false |