Skip to content

Commit

Permalink
new route : /update/action to update action in scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Sep 14, 2016
1 parent ed6c335 commit bd58186
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/controllers/UpdateController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ module.exports = {
.catch(next);
},

/**
* Check for new Actions
*/
updateActions: function(req, res, next){
gladys.update.getActions(req.session.User)
.then(function(result){
return res.json(result);
})
.catch(next);
},

/**
* Check for new boxTypes
*/
Expand Down
1 change: 1 addition & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ module.exports.routes = {

// Update
'get /update/verify': 'UpdateController.verify',
'get /update/action': 'UpdateController.updateActions',
'get /update/event': 'UpdateController.updateEvents',
'get /update/mode': 'UpdateController.updateModes',
'get /update/sentence': 'UpdateController.updateSentences',
Expand Down

0 comments on commit bd58186

Please sign in to comment.