Skip to content

Commit

Permalink
fix: update API
Browse files Browse the repository at this point in the history
  • Loading branch information
HungLV46 committed Aug 16, 2024
1 parent f293d26 commit 84be06e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/apis/routes/products/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const updateProductionRoute: Hapi.ServerRoute = {
id: Joi.number().required().example(1),
}),
payload: Joi.object({
// TODO make optional
name: Joi.string().required().example('Product name'),
owner_id: Joi.number().required().example(1),
avatar_img: Joi.string()
Expand Down Expand Up @@ -43,7 +44,7 @@ export const updateProductionRoute: Hapi.ServerRoute = {
'https://loremflickr.com/640/480?lock=1572275828555776',
'https://loremflickr.com/640/480?lock=1572275828555776',
]),
cta_link: Joi.string().example('https://www.google.com'),
cta_url: Joi.string().default('').example('https://www.google.com'),
}).required(),
collections: Joi.array()
.items(
Expand Down

0 comments on commit 84be06e

Please sign in to comment.