initial commit
This commit is contained in:
10
routes/animal.route.js
Normal file
10
routes/animal.route.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var { createSingleAnimal, getSingleAnimal, getAllAnimals, updateSingleAnimal, deleteSingleAnimal } = require("../controllers/animal.controller");
|
||||
var { isAuthorized } = require("../middleware/auth");
|
||||
|
||||
module.exports = function(router) {
|
||||
router.post("/api/v1/animals", isAuthorized, createSingleAnimal);
|
||||
router.get("/api/v1/animals/:id", getSingleAnimal);
|
||||
router.get("/api/v1/animals", getAllAnimals);
|
||||
router.put("/api/v1/animals/:id", isAuthorized, updateSingleAnimal);
|
||||
router.delete("/api/v1/animals/:id", isAuthorized, deleteSingleAnimal);
|
||||
};
|
||||
Reference in New Issue
Block a user