user id verwenden, statt testuser1
This commit is contained in:
parent
79a5f17a2c
commit
0ba4a11d23
@ -71,7 +71,7 @@ router.get("/myshoppinglists", async function(req, res, next) {
|
||||
|
||||
try {
|
||||
//Get user id: req.session.passport.user.profile.id
|
||||
res.status(200).send(await postgres.getShoppinglistsAdmin("testuser1"));
|
||||
res.status(200).send(await postgres.getShoppinglistsAdmin(req.session.passport.user.profile.id));
|
||||
}
|
||||
|
||||
catch(err) {
|
||||
@ -85,7 +85,7 @@ router.get("/myshoppinglists", async function(req, res, next) {
|
||||
router.get("/sharedshoppinglists", async function(req, res, next) {
|
||||
try {
|
||||
//Get user id: req.session.passport.user.profile.id
|
||||
res.status(200).send(await postgres.getShoppinglistsShared("testuser1"));
|
||||
res.status(200).send(await postgres.getShoppinglistsShared(req.session.passport.user.profile.id));
|
||||
}
|
||||
|
||||
catch(err) {
|
||||
@ -98,7 +98,7 @@ router.get("/sharedshoppinglists", async function(req, res, next) {
|
||||
|
||||
router.post("/shoppinglist", async function(req, res, next) {
|
||||
try {
|
||||
res.status(200).send(await postgres.newShoppinglist(req.body.name, req.body.description, "testuser1"));
|
||||
res.status(200).send(await postgres.newShoppinglist(req.body.name, req.body.description, req.session.passport.user.profile.id));
|
||||
}
|
||||
|
||||
catch(err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user