{"size": 633, "ext": "js", "max_stars_repo_path": "src/routes/foodRoute/foodRoutes.js", "max_stars_repo_name": "Ibrahimng/code-jammers-backend", "max_stars_repo_stars_event_min_datetime": "2020-10-30T06:57:51.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-16T11:59:26.000Z", "max_issues_repo_path": "src/routes/foodRoute/foodRoutes.js", "max_issues_repo_name": "Ibrahimng/code-jammers-backend", "max_issues_repo_issues_event_min_datetime": "2020-08-31T18:58:56.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-14T07:53:27.000Z", "max_forks_repo_path": "src/routes/foodRoute/foodRoutes.js", "max_forks_repo_name": "Ibrahimng/code-jammers-backend", "max_forks_repo_forks_event_min_datetime": "2020-08-31T10:15:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-02T06:48:59.000Z"}
{"max_stars_count": 13, "max_issues_count": 24, "max_forks_count": 7, "avg_line_length": 30.1428571429, "max_line_length": 76, "alphanum_fraction": 0.7361769352}
import { Router } from "express";
import Food from "../../controllers/food/food";
import Authentication from "../../middlewares/authenticate";

const {
  createFood,
  getAllFoods,
  getOneFoodById,
  updateFood,
  deleteFood
} = Food;
const { verifyAdmin, verifyToken } = Authentication;
const router = Router();
router.post("/admin/food/:countryId", verifyToken, verifyAdmin, createFood);
router.patch("/admin/food/:id", verifyToken, verifyAdmin, updateFood);
router.delete("/admin/food/:id", verifyToken, verifyAdmin, deleteFood);
router.get("/food", getAllFoods);
router.get("/food/:id", getOneFoodById);

export default router;
