apps/recallassess/recallassess-api/src/api/client/testimonial/testimonial.controller.ts
api/client/testimonial
Methods |
|
| Async getPublishedTestimonials |
getPublishedTestimonials()
|
Decorators :
@HttpCode(HttpStatus.OK)
|
|
Get all published testimonials GET /api/client/testimonial
Returns :
Promise<CLTestimonialDto[]>
|
import { Public } from "@bish-nest/core/auth/decorator/public.decorator";
import { Controller, Get, HttpCode, HttpStatus } from "@nestjs/common";
import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger";
import { CLTestimonialDto } from "./dto";
import { CLTestimonialService } from "./testimonial.service";
@ApiTags("Client - Testimonials")
@Controller("api/client/testimonial")
export class CLTestimonialController {
constructor(private testimonialService: CLTestimonialService) {}
/**
* Get all published testimonials
* GET /api/client/testimonial
*/
@HttpCode(HttpStatus.OK)
@Public()
@Get()
@ApiOperation({ summary: "Get all published testimonials" })
@ApiResponse({
status: 200,
description: "Returns array of published testimonials",
type: [CLTestimonialDto],
})
async getPublishedTestimonials(): Promise<CLTestimonialDto[]> {
return this.testimonialService.getPublishedTestimonials();
}
}