/* eslint-disable no-return-await */ import { Controller, Delete, Get, HttpStatus, Post } from '@nestjs/common'; import { BoilerplateService } from '../services/boilerplate.service'; import { ApiTags } from '@nestjs/swagger'; @ApiTags('Boilerplates') // Swagger Tag @Controller('boilerplates') // Base route export class BoilerplateController { // eslint-disable-next-line no-unused-vars constructor(private readonly boilerplateService: BoilerplateService) {} @Get('/hello') // Route for this get request async getHello(): Promise<string> { return await this.boilerplateService.getHello(); } @Post('/post') // Route for this post request async postMethod(): Promise<HttpStatus> { // Returns 501 return await this.boilerplateService.postMethod(); } @Delete('/delete') // Route for this delete request async deleteMethod(): Promise<HttpStatus> { // Returns 501 return await this.boilerplateService.deleteMethod(); } }