Added Salvi's backend folder from backend branch to allow ombase to continue testing.

This commit is contained in:
K
2025-02-23 09:05:16 +05:30
parent 3f9e6d3dee
commit 7da2809399
28 changed files with 6979 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
const express = require("express");
const {
createFarm,
getUserFarms,
getFarmById,
updateFarm,
deleteFarm,
} = require("../Controllers/farm.controller.js");
const { checkAuthenticated } = require("../Middlewares/authentication.js");
const router = express.Router();
router.post("/", checkAuthenticated, createFarm); // Create a new farm
router.get("/", checkAuthenticated, getUserFarms); // Get all farms
router.get("/:farmId", checkAuthenticated, getFarmById); // Get a farm by ID
router.put("/:farmId", checkAuthenticated, updateFarm); // Update a farm
router.delete("/:farmId", checkAuthenticated, deleteFarm); // Delete a farm
module.exports = router;