mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Add ability to disable NSFW flags settings
This commit is contained in:
parent
9f180a36c4
commit
dc05b37d17
12 changed files with 867 additions and 323 deletions
|
@ -1,4 +1,4 @@
|
|||
import { VideosCommonQuery } from '@peertube/peertube-models'
|
||||
import { NSFWFlag, VideosCommonQuery } from '@peertube/peertube-models'
|
||||
import { getLowercaseExtension } from '@peertube/peertube-node-utils'
|
||||
import express, { RequestHandler } from 'express'
|
||||
import multer, { diskStorage } from 'multer'
|
||||
|
@ -19,8 +19,14 @@ export function buildNSFWFilters (options: {
|
|||
} = {}) {
|
||||
return {
|
||||
nsfw: buildNSFWFilter(options),
|
||||
nsfwFlagsIncluded: buildNSFWFlagsIncluded(options),
|
||||
nsfwFlagsExcluded: buildNSFWFlagsExcluded(options)
|
||||
|
||||
nsfwFlagsIncluded: CONFIG.NSFW_FLAGS_SETTINGS.ENABLED
|
||||
? buildNSFWFlagsIncluded(options)
|
||||
: NSFWFlag.NONE,
|
||||
|
||||
nsfwFlagsExcluded: CONFIG.NSFW_FLAGS_SETTINGS.ENABLED
|
||||
? buildNSFWFlagsExcluded(options)
|
||||
: NSFWFlag.NONE
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue