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:
parent
b12a188faf
commit
803fc6752d
@ -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
38
shift.sh
Normal 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 \
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user