1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

send toggleName back

This commit is contained in:
sveisvei 2016-12-05 17:58:29 +01:00 committed by Ivar Conradi Østhus
parent b12a188faf
commit 803fc6752d
2 changed files with 44 additions and 2 deletions

View File

@ -14,10 +14,14 @@ module.exports = function (app, config) {
});
app.get('/events/:name', (req, res) => {
eventStore.getEventsFilterByName(req.params.name).then(events => {
const toggleName = req.params.name;
eventStore.getEventsFilterByName(toggleName).then(events => {
if (events) {
eventDiffer.addDiffs(events);
res.json(events);
res.json({
toggleName,
events,
});
} else {
res.status(404).json({ error: 'Could not find events' });
}

38
shift.sh Normal file
View File

@ -0,0 +1,38 @@
jscodeshift \
-t ../js-codemod/transforms/no-vars.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/object-shorthand.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/template-literals.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/unchain-variables.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/unquote-properties.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/arrow-function.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/use-strict.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \
&& \
jscodeshift \
-t ../js-codemod/transforms/trailing-commas.js \
packages/ --ignore-pattern=node_modules --extensions=js,jsx \