aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-02-03 15:19:43 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-13 16:32:58 +0100
commit9677fca772349248925da6c5f34f600e9a2abbe6 (patch)
tree635c9aba8c4966eb9fd77355a47bcb83dff9df71 /server
parent52cc0d54850e0acf069d2f95d063826f16ff5238 (diff)
downloadPeerTube-9677fca772349248925da6c5f34f600e9a2abbe6.tar.gz
PeerTube-9677fca772349248925da6c5f34f600e9a2abbe6.tar.zst
PeerTube-9677fca772349248925da6c5f34f600e9a2abbe6.zip
Make the search helper change based on the server config
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/config.ts6
-rw-r--r--server/controllers/static.ts6
2 files changed, 12 insertions, 0 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 69940f395..a383a723f 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -73,6 +73,12 @@ async function getConfig (req: express.Request, res: express.Response) {
73 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS 73 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
74 } 74 }
75 }, 75 },
76 search: {
77 remoteUri: {
78 users: CONFIG.SEARCH.REMOTE_URI.USERS,
79 anonymous: CONFIG.SEARCH.REMOTE_URI.ANONYMOUS
80 }
81 },
76 plugin: { 82 plugin: {
77 registered: getRegisteredPlugins() 83 registered: getRegisteredPlugins()
78 }, 84 },
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index 4c6cf9597..75d1a816b 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -235,6 +235,12 @@ async function generateNodeinfo (req: express.Request, res: express.Response) {
235 nodeName: CONFIG.INSTANCE.NAME, 235 nodeName: CONFIG.INSTANCE.NAME,
236 nodeDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION, 236 nodeDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
237 nodeConfig: { 237 nodeConfig: {
238 search: {
239 remoteUri: {
240 users: CONFIG.SEARCH.REMOTE_URI.USERS,
241 anonymous: CONFIG.SEARCH.REMOTE_URI.ANONYMOUS
242 }
243 },
238 plugin: { 244 plugin: {
239 registered: getRegisteredPlugins() 245 registered: getRegisteredPlugins()
240 }, 246 },