Skip to content

Commit

Permalink
Work around for node4good#122
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyoconnor committed Mar 1, 2017
1 parent 9a6f4b6 commit f7b654d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ module.exports = function (registry) {
actionDocuments: function actionDocuments(req, res) {
var modelName = req.params.modelName,
actionId = req.params['actionId'],
ids = req.body.ids,
ids = ('ids' in req.body) ? req.body.ids : req.body['ids[]'],
model = registry.models[modelName];

ids = (typeof(ids) === 'string') ? [ ids ] : ids;
if (!req.admin_user.hasPermissions(modelName, 'update'))
throw new Error('unauthorized');

Expand Down

0 comments on commit f7b654d

Please sign in to comment.