chore: add service review add and get in service page and also approve and reject for admin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Body, Controller, Get, HttpCode, HttpStatus, Param, Post, Query } from "@nestjs/common";
|
||||
import { ApiOperation, ApiTags } from "@nestjs/swagger";
|
||||
|
||||
import { AddReviewDto } from "./DTO/add-review.dto";
|
||||
import { CategoryListSearchQueryDto, CategorySearchQueryDto } from "./DTO/category-search-query.dto";
|
||||
import { CreateCategoryDto } from "./DTO/create-category.dto";
|
||||
import { CreateServiceDto } from "./DTO/create-service.dto";
|
||||
@@ -106,6 +107,13 @@ export class DanakServicesController {
|
||||
return this.danakServicesService.getDanakServiceByIdWithSubs(paramDto.id, isAdmin);
|
||||
}
|
||||
|
||||
@ApiOperation({ summary: "add review to danak service ==> user route" })
|
||||
@AuthGuards()
|
||||
@Post(":id/reviews")
|
||||
addReview(@Param() paramDto: ParamDto, @Body() addReviewDto: AddReviewDto, @UserDec("id") userId: string) {
|
||||
return this.danakServicesService.addReview(userId, paramDto.id, addReviewDto);
|
||||
}
|
||||
|
||||
// @AuthGuards()
|
||||
//
|
||||
// @ApiOperation({ summary: "get all user purchased danak services" })
|
||||
|
||||
Reference in New Issue
Block a user