1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/lib/routes/admin-api/config.js

20 lines
412 B
JavaScript
Raw Normal View History

2019-03-12 10:46:08 +01:00
'use strict';
const Controller = require('../controller');
class ConfigController extends Controller {
constructor(config) {
super(config);
this.uiConfig = { ...config.ui, version: config.version };
2019-03-12 10:46:08 +01:00
this.get('/', this.getUIConfig);
}
async getUIConfig(req, res) {
const config = this.uiConfig;
res.json(config);
}
}
module.exports = ConfigController;