mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
19 lines
369 B
JavaScript
19 lines
369 B
JavaScript
'use strict';
|
|
|
|
const { Router } = require('express');
|
|
|
|
const version = 1;
|
|
|
|
exports.router = config => {
|
|
const router = Router();
|
|
const { featureToggleStore } = config.stores;
|
|
|
|
router.get('/', (req, res) => {
|
|
featureToggleStore
|
|
.getFeatures()
|
|
.then(features => res.json({ version, features }));
|
|
});
|
|
|
|
return router;
|
|
};
|