mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Add advanced search in client
This commit is contained in:
parent
d525fc399a
commit
0b18f4aa80
21 changed files with 583 additions and 33 deletions
|
@ -5,8 +5,10 @@ import { logger } from './logger'
|
|||
import { User } from '../../shared/models/users'
|
||||
import { generateRandomString } from './utils'
|
||||
|
||||
function buildNSFWFilter (res: express.Response, paramNSFW?: boolean) {
|
||||
if (paramNSFW === true || paramNSFW === false) return paramNSFW
|
||||
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) {
|
||||
const user: User = res.locals.oauth.token.User
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue