Merged Salvi's backend changes.

This commit is contained in:
K
2025-02-23 09:26:44 +05:30
parent 7da2809399
commit 4e6ce0e723
2 changed files with 57 additions and 8 deletions
+9 -2
View File
@@ -7,7 +7,10 @@ const {
deleteCrop,
updateHealthStatus,
updateGrowthStage,
cropSuggest,
cropHarvest,
suggestNextCrop,
suggestPesticides,
suggestFertilizers,
} = require("../Controllers/crop.controller.js");
const { checkAuthenticated } = require("../Middlewares/authentication.js");
const upload = require("../Middlewares/multer.js");
@@ -22,6 +25,10 @@ router.put("/:cropId", checkAuthenticated, updateCrop); // Update crop details
router.delete("/:cropId", checkAuthenticated, deleteCrop); // Delete a crop
router.put("/health/:cropId", checkAuthenticated, updateHealthStatus);
router.put("/growth/:cropId", checkAuthenticated, updateGrowthStage);
router.get("/suggest/:cropId", checkAuthenticated, cropSuggest);
router.get("/harvest/:cropId", checkAuthenticated, cropHarvest);
router.get("/nextCrop/:cropId", checkAuthenticated, suggestNextCrop);
router.get("/pesticides/:cropId", checkAuthenticated, suggestPesticides);
router.get("/fertilizers/:cropId", checkAuthenticated, suggestFertilizers);
module.exports = router;