mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add sitemap
This commit is contained in:
parent
3b3b18203f
commit
2feebf3e6a
11 changed files with 241 additions and 4 deletions
|
@ -7,12 +7,12 @@ import { extname } from 'path'
|
|||
import { isArray } from './custom-validators/misc'
|
||||
import { UserModel } from '../models/account/user'
|
||||
|
||||
function buildNSFWFilter (res: express.Response, paramNSFW?: string) {
|
||||
function buildNSFWFilter (res?: express.Response, paramNSFW?: string) {
|
||||
if (paramNSFW === 'true') return true
|
||||
if (paramNSFW === 'false') return false
|
||||
if (paramNSFW === 'both') return undefined
|
||||
|
||||
if (res.locals.oauth) {
|
||||
if (res && res.locals.oauth) {
|
||||
const user: UserModel = res.locals.oauth.token.User
|
||||
|
||||
// User does not want NSFW videos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue