"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const express_1 = require("express"); const ShoppingListController_1 = require("../controller/ShoppingListController"); const ShoppingItemController_1 = require("../controller/ShoppingItemController"); const checkJwt_1 = require("../middleware/checkJwt"); const router = (0, express_1.Router)(); // Lists router.get("/", [checkJwt_1.checkJwt], ShoppingListController_1.ShoppingListController.listAll); router.get("/:id", [checkJwt_1.checkJwt], ShoppingListController_1.ShoppingListController.getOneById); router.post("/", [checkJwt_1.checkJwt], ShoppingListController_1.ShoppingListController.new); router.delete("/:id", [checkJwt_1.checkJwt], ShoppingListController_1.ShoppingListController.delete); // Items router.post("/:listId/items", [checkJwt_1.checkJwt], ShoppingItemController_1.ShoppingItemController.newItem); router.put("/items/:id", [checkJwt_1.checkJwt], ShoppingItemController_1.ShoppingItemController.editItem); router.delete("/items/:id", [checkJwt_1.checkJwt], ShoppingItemController_1.ShoppingItemController.deleteItem); exports.default = router;