File

apps/recallassess/recallassess-api/src/api/client/testimonial/testimonial.controller.ts

Prefix

api/client/testimonial

Index

Methods

Methods

Async getPublishedTestimonials
getPublishedTestimonials()
Decorators :
@HttpCode(HttpStatus.OK)
@Public()
@Get()
@ApiOperation({summary: 'Get all published testimonials'})
@ApiResponse({status: 200, description: 'Returns array of published testimonials', type: undefined})

Get all published testimonials GET /api/client/testimonial

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();
  }
}

results matching ""

    No results matching ""