aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-20 15:36:43 +0100
committerChocobozzz <me@florianbigard.com>2019-02-20 15:36:43 +0100
commitf8802489bbc2c0363b5668e47de7c35f573342e1 (patch)
tree526054fad5a7f944b008ac1a6e400dfbe66a1639 /server/initializers
parent1aabcae7e36bb113c2887bd7180dad2916ecaaf2 (diff)
downloadPeerTube-f8802489bbc2c0363b5668e47de7c35f573342e1.tar.gz
PeerTube-f8802489bbc2c0363b5668e47de7c35f573342e1.tar.zst
PeerTube-f8802489bbc2c0363b5668e47de7c35f573342e1.zip
Add isNSFW instance configuration key
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-before-init.ts2
-rw-r--r--server/initializers/constants.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 29fdb263e..230fdd356 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -23,7 +23,7 @@ function checkMissedConfig () {
23 'import.videos.http.enabled', 'import.videos.torrent.enabled', 23 'import.videos.http.enabled', 'import.videos.torrent.enabled',
24 'trending.videos.interval_days', 24 'trending.videos.interval_days',
25 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', 25 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route',
26 'instance.default_nsfw_policy', 'instance.robots', 'instance.securitytxt', 26 'instance.is_nsfw', 'instance.default_nsfw_policy', 'instance.robots', 'instance.securitytxt',
27 'services.twitter.username', 'services.twitter.whitelisted' 27 'services.twitter.username', 'services.twitter.whitelisted'
28 ] 28 ]
29 const requiredAlternatives = [ 29 const requiredAlternatives = [
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index c1be7f326..bb2c6765f 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -288,6 +288,7 @@ const CONFIG = {
288 get SHORT_DESCRIPTION () { return config.get<string>('instance.short_description') }, 288 get SHORT_DESCRIPTION () { return config.get<string>('instance.short_description') },
289 get DESCRIPTION () { return config.get<string>('instance.description') }, 289 get DESCRIPTION () { return config.get<string>('instance.description') },
290 get TERMS () { return config.get<string>('instance.terms') }, 290 get TERMS () { return config.get<string>('instance.terms') },
291 get IS_NSFW () { return config.get<boolean>('instance.is_nsfw') },
291 get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') }, 292 get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') },
292 get DEFAULT_NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') }, 293 get DEFAULT_NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') },
293 CUSTOMIZATIONS: { 294 CUSTOMIZATIONS: {