diff --git a/express-server/public/javascripts/test.js b/express-server/public/javascripts/test.js index ca6a2528..86cc2fc5 100644 --- a/express-server/public/javascripts/test.js +++ b/express-server/public/javascripts/test.js @@ -2,7 +2,7 @@ $(document).ready(function() { refresh(); $(document).on("click", ".btn_detail", function() { - window.location.replace("/shoppinglist/" + $(this).closest("tr").attr("id")); + window.location.replace("/shoppinglist_json/" + $(this).closest("tr").attr("id")); }); $(".btn_add").click(function() { diff --git a/express-server/routes/index.js b/express-server/routes/index.js index e132f673..f8049d05 100644 --- a/express-server/routes/index.js +++ b/express-server/routes/index.js @@ -100,7 +100,7 @@ router.post("/shoppinglist", async function(req, res, next) { //GET Shoppinglist detail -router.get("/shoppinglist/:sl_id", async (req, res) => { +router.get("/shoppinglist_json/:sl_id", async (req, res) => { try { res.status(200).send(await postgres.displayShoppinglist(req.params.sl_id)); } diff --git a/express-server/views/index1.ejs b/express-server/views/index1.ejs index ef387043..2982a508 100644 --- a/express-server/views/index1.ejs +++ b/express-server/views/index1.ejs @@ -53,6 +53,12 @@ +
+

JSON Objects & Routes

+ Eigene Einkaufslisten anzeigen /myshoppinglists
+ Mit mir geteilte Einkaufslisten anzeigen /sharedshoppinglists
+ Einkaufliste öffnen (Spar) /shoppinglist/:id +