File tree Expand file tree Collapse file tree 2 files changed +58
-1
lines changed
Expand file tree Collapse file tree 2 files changed +58
-1
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ export const deleteReviewService = async (
294294 customResponse < typeof data > ( {
295295 success : true ,
296296 error : false ,
297- message : `Successfully deleted review to product : ${ req . params . productId } ` ,
297+ message : `Successfully deleted review from product by ID : ${ req . params . productId } ` ,
298298 status : 200 ,
299299 data,
300300 } )
Original file line number Diff line number Diff line change @@ -309,6 +309,63 @@ paths:
309309 schema :
310310 ' $ref ' : ' #/components/schemas/ServerErrorResponse'
311311
312+ /products/reviews/{productId} :
313+ delete :
314+ security :
315+ - Authorization : []
316+ summary : Delete review and comment based on request id
317+ tags :
318+ - Product
319+ parameters :
320+ - in : path
321+ name : productId
322+ required : true
323+ description : Unique id
324+ schema :
325+ type : string
326+ minimum : 1
327+ example : 6398540ee6e5ae8c37c333ac
328+ responses :
329+ ' 200 ' :
330+ description : OK
331+ content :
332+ application/json :
333+ schema :
334+ type : object
335+ properties :
336+ success :
337+ type : boolean
338+ example : true
339+ description :
340+ error :
341+ type : boolean
342+ example : false
343+ status :
344+ type : integer
345+ example : 200
346+ message :
347+ type : string
348+ example : Successfully deleted review from product by ID ...
349+ data :
350+ type : object
351+ properties :
352+ product :
353+ type : object
354+ ' $ref ' : ' #/components/schemas/ProductResponse'
355+ ' 400 ' :
356+ description : Bad request
357+ content :
358+ application/json :
359+ schema :
360+ ' $ref ' : ' #/components/schemas/BadRequestResponse'
361+
362+ ' 500 ' :
363+ description : 500 Internal Server Error
364+ content :
365+ application/json :
366+ schema :
367+ ' $ref ' : ' #/components/schemas/ServerErrorResponse'
368+
312369 # Cart
313370
314371 /cart :
You can’t perform that action at this time.
0 commit comments