Skip to content

Commit

Permalink
fixed delete validator
Browse files Browse the repository at this point in the history
  • Loading branch information
androozka committed Sep 1, 2019
1 parent f6d2ce2 commit 8744022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/v2/routes/support/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = ({ instance, headers }) => {
},

delete: (options = {}) => {
const { error } = validate.show(options);
const { error } = validate.delete(options);
if (error) throw new Error(error.details[0].message);

const { id } = options;
Expand Down
3 changes: 2 additions & 1 deletion src/api/v2/validators/support/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ module.exports = {
show: options => Joi.validate(options, { id: id.required() }),
create: options => Joi.validate(options, { data: data.required() }),
update: options =>
Joi.validate(options, { id: id.required(), data: data.required() })
Joi.validate(options, { id: id.required(), data: data.required() }),
delete: options => Joi.validate(options, { id: id.required() })
};

0 comments on commit 8744022

Please sign in to comment.