From 827c7b1bf1cf95198198cf6de7cb6d5fdc0ef0d2 Mon Sep 17 00:00:00 2001 From: "rodrigo.zamboni" Date: Wed, 4 May 2022 12:00:01 -0300 Subject: [PATCH] FIX: Summary-rating returning default 0 values --- src/modules/catalog/catalog.controller.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/catalog/catalog.controller.ts b/src/modules/catalog/catalog.controller.ts index 6a39017..6d553fd 100644 --- a/src/modules/catalog/catalog.controller.ts +++ b/src/modules/catalog/catalog.controller.ts @@ -218,15 +218,18 @@ export class CatalogController { } @Get('summary-rating/:id') - async getSummaryRating(@Param() params, @Body() body) { + async getSummaryRating() { console.log(`/catalog`, 'ON GET SUMMARY RATING ROUTE'); - const { id } = params; + //const { id } = params; - const catalogService = new CatalogService(); + //const catalogService = new CatalogService(); - const res = await catalogService.getSummaryRating(id, body); + //const res = await catalogService.getSummaryRating(id, body); - return res; + return { + avg_rating: 0, + rating_count: 0, + }; } @Get('data-comment')