added /config endpoint, use fewer globals (#1172)
* added /config endpoint, use fewer globals * fixed integration tests
This commit is contained in:
parent
8df400a676
commit
1c44d1d0f9
15 changed files with 92 additions and 80 deletions
|
@ -8,6 +8,7 @@ const auth = require('../middleware/auth');
|
|||
const language = require('../middleware/language');
|
||||
const pages = require('./pages');
|
||||
const filelist = require('./filelist');
|
||||
const clientConstants = require('../clientConstants');
|
||||
|
||||
const IS_DEV = config.env === 'development';
|
||||
const ID_REGEX = '([0-9a-fA-F]{10})';
|
||||
|
@ -70,6 +71,9 @@ module.exports = function(app) {
|
|||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.text());
|
||||
app.get('/', language, pages.index);
|
||||
app.get('/config', function(req, res) {
|
||||
res.json(clientConstants);
|
||||
});
|
||||
app.get('/error', language, pages.blank);
|
||||
app.get('/oauth', language, pages.blank);
|
||||
app.get('/legal', language, pages.legal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue