Applicatie afmaken en GUI-flow herstellen
Voegt boodschappenlijsten, productbeheer, realtime synchronisatie en browsercache-updates toe. Herstelt login- en sessiegedrag en maakt database-seeding herhaalbaar.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+45
-3
@@ -11,8 +11,8 @@ require("../controllers/HouseholdController");
|
||||
const ProductController =
|
||||
require("../controllers/ProductController");
|
||||
|
||||
console.log("AUTH:", auth);
|
||||
console.log("DASHBOARD INDEX:", DashboardController.index);
|
||||
const ShoppingListController =
|
||||
require("../controllers/ShoppingListController");
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
@@ -27,7 +27,6 @@ router.get(
|
||||
);
|
||||
|
||||
router.get(
|
||||
|
||||
"/products",
|
||||
|
||||
auth,
|
||||
@@ -35,4 +34,47 @@ router.get(
|
||||
ProductController.index.bind(ProductController)
|
||||
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/products",
|
||||
auth,
|
||||
ProductController.create.bind(ProductController)
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/lists",
|
||||
auth,
|
||||
ShoppingListController.index.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/lists",
|
||||
auth,
|
||||
ShoppingListController.create.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/lists/:id",
|
||||
auth,
|
||||
ShoppingListController.show.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/lists/:id/items",
|
||||
auth,
|
||||
ShoppingListController.addItem.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/lists/:id/items/:itemId/toggle",
|
||||
auth,
|
||||
ShoppingListController.toggleItem.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
router.delete(
|
||||
"/lists/:id/items/:itemId",
|
||||
auth,
|
||||
ShoppingListController.deleteItem.bind(ShoppingListController)
|
||||
);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user