diff --git a/src/api/routes/wishlist/update.ts b/src/api/routes/wishlist/update.ts index 5265bcf..a8775fe 100644 --- a/src/api/routes/wishlist/update.ts +++ b/src/api/routes/wishlist/update.ts @@ -12,10 +12,23 @@ export const updateItem = { method: 'PUT', url: '/:wishlistId/item/:itemId', schema: { + body: { + type: 'object', + additionalProperties: false, + properties: { + title: { type: 'string' }, + url: { type: 'string' }, + image: { type: 'string' }, + description: { type: 'string' }, + comment: { type: 'string' }, + bought: { type: 'boolean' }, + }, + }, response: { 204: { type: 'object', properties: { + id: { type: 'number' }, title: { type: 'string' }, url: { type: 'string' }, image: { type: 'string' }, @@ -28,6 +41,7 @@ export const updateItem = { }, }, handler: async (request: GetBySlugUrlTextRequest, reply: FastifyReply) => { + request.log.debug(request.body) const item = await wishlist.updateItem( Number(request.params.itemId), request.body