1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/routes/admin-api/config.js
2020-08-03 13:34:10 +02:00

20 lines
412 B
JavaScript

'use strict';
const Controller = require('../controller');
class ConfigController extends Controller {
constructor(config) {
super(config);
this.uiConfig = { ...config.ui, version: config.version };
this.get('/', this.getUIConfig);
}
async getUIConfig(req, res) {
const config = this.uiConfig;
res.json(config);
}
}
module.exports = ConfigController;