Skip to content
Snippets Groups Projects
Unverified Commit 5ee1957b authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #202 from HumanBrainProject/hotfix_stagingPlugin

hotfix: also read STAGING_PLUGIN_URLS for PLUGIN_URLS
parents 9636d111 e733a551
No related branches found
No related tags found
No related merge requests found
......@@ -5,15 +5,14 @@
const express = require('express')
const router = express.Router()
const PLUGIN_URLS = process.env.PLUGIN_URLS && JSON.stringify(process.env.PLUGIN_URLS.split(';'))
const PLUGIN_URLS = (process.env.PLUGIN_URLS && JSON.stringify(process.env.PLUGIN_URLS.split(';'))) || []
const STAGING_PLUGIN_URLS = (process.env.STAGING_PLUGIN_URLS && JSON.stringify(process.env.STAGING_PLUGIN_URLS.split(';'))) || []
router.get('', (_req, res) => {
if (PLUGIN_URLS) {
return res.status(200).send(PLUGIN_URLS)
} else {
return res.status(200).send('[]')
}
return res.status(200).json([
...PLUGIN_URLS,
...STAGING_PLUGIN_URLS
])
})
module.exports = router
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment