25 lines
482 B
JavaScript
25 lines
482 B
JavaScript
const router = require("express").Router();
|
|
const controller = require("./material.controller");
|
|
|
|
/**
|
|
* @route /material/:id
|
|
*/
|
|
router.get("/:id", controller.getMaterialByID);
|
|
|
|
/**
|
|
* @route /material/
|
|
*/
|
|
router.post("/", controller.createMaterial);
|
|
|
|
/**
|
|
* @route /material/
|
|
*/
|
|
router.patch("/:id", controller.updateMaterialByID);
|
|
|
|
/**
|
|
* @route /material/search-by-inventory
|
|
*/
|
|
router.get("/search-by-inventory", controller.getMaterialByInventory);
|
|
|
|
module.exports = router;
|