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.
 
 

21 lines
468 B

import { Router } from "express";
import { CatType, Cat } from "./cats.model";
import {
createCat,
deleteCat,
readAllCat,
readCat,
updateCat,
updatePartialCat,
} from "./cats.service";
const router = Router();
router.post("/cats", createCat);
router.get("/cats", readAllCat);
router.get("/cats/:id", readCat);
router.put("/cats/:id", updateCat);
router.patch("/cats/:id", updatePartialCat);
router.delete("/cats/:id", deleteCat);
export default router;