You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
NestJS_Basic/nest-start/src/cats/cats.controller.ts

37 lines
600 B

import { Controller, Delete, Get, Patch, Post, Put } from "@nestjs/common";
import { CatsService } from "./cats.service";
@Controller("cats")
export class CatsController {
constructor(private readonly catsService: CatsService) {}
@Get()
getAllCat() {
return "all cat";
}
@Get(":id")
getOneGat() {
return "one cat";
}
@Post()
createCat() {
return "create cat";
}
@Put(":id")
updateCat() {
return "update cat";
}
@Patch(":id")
updatePartialCat() {
return "update partial cat";
}
@Delete(":id")
deleteCat() {
return "delete cat";
}
}