aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-05 17:27:24 +0100
committerChocobozzz <me@florianbigard.com>2018-12-05 17:44:34 +0100
commit2feebf3e6afaad9ab80976d1557d3a7bcf94de03 (patch)
tree47df940d7d600cec5e08eb7715bdb5bdae085e59 /server/helpers
parent3b3b18203fe73e499bf8b49b15369710df95993e (diff)
downloadPeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.gz
PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.zst
PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.zip
Add sitemap
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/express-utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts
index 162fe2244..9a72ee96d 100644
--- a/server/helpers/express-utils.ts
+++ b/server/helpers/express-utils.ts
@@ -7,12 +7,12 @@ import { extname } from 'path'
7import { isArray } from './custom-validators/misc' 7import { isArray } from './custom-validators/misc'
8import { UserModel } from '../models/account/user' 8import { UserModel } from '../models/account/user'
9 9
10function buildNSFWFilter (res: express.Response, paramNSFW?: string) { 10function buildNSFWFilter (res?: express.Response, paramNSFW?: string) {
11 if (paramNSFW === 'true') return true 11 if (paramNSFW === 'true') return true
12 if (paramNSFW === 'false') return false 12 if (paramNSFW === 'false') return false
13 if (paramNSFW === 'both') return undefined 13 if (paramNSFW === 'both') return undefined
14 14
15 if (res.locals.oauth) { 15 if (res && res.locals.oauth) {
16 const user: UserModel = res.locals.oauth.token.User 16 const user: UserModel = res.locals.oauth.token.User
17 17
18 // User does not want NSFW videos 18 // User does not want NSFW videos