fehler behoben

This commit is contained in:
LukasNowy 2018-11-20 13:15:21 +01:00
parent 04c0d69cb3
commit 6766a6a3e9
3 changed files with 8 additions and 2 deletions

View File

@ -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() {

View File

@ -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));
}

View File

@ -53,6 +53,12 @@
</table>
</div>
</div>
<div>
<p>JSON Objects & Routes</p>
<a href="/myshoppinglists">Eigene Einkaufslisten anzeigen /myshoppinglists</a><br>
<a href="/sharedshoppinglists">Mit mir geteilte Einkaufslisten anzeigen /sharedshoppinglists</a><br>
<a href="/shoppinglist_json/0">Einkaufliste öffnen (Spar) /shoppinglist/:id</a>
</div>
</div>
<script src="/jquery/dist/jquery.js"></script>