Skip to content

Commit

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

module.exports = {
list: null, // no options
show: options => Joi.validate(options, { id: id.required() }),
create: options => Joi.validate(options, { data: data.required() }),

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

create: options =>
Joi.object({
data: data.required()
}).validate(options),

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

delete: options =>
Joi.object({
id: id.required()
}).validate(options)
};

0 comments on commit 5e8e61e

Please sign in to comment.