Skip to content

Commit

Permalink
fixed end_users
Browse files Browse the repository at this point in the history
  • Loading branch information
androozka committed Sep 18, 2019
1 parent 02df3b2 commit 9725a57
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/v2/support/end_users/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ const id = Joi.number().min(1);
const data = Joi.object();

module.exports = {
show: options => Joi.validate(options, { id: id.required() }),
show: options =>
Joi.object({
id: id.required()
}).validate(options),

update: options =>
Joi.validate(options, { id: id.required(), data: data.required() })
Joi.object({
id: id.required(),
data: data.required()
}).validate(options)
};

0 comments on commit 9725a57

Please sign in to comment.