Invite bug fix
This commit is contained in:
@ -148,6 +148,30 @@ router.get("/sharedshoppinglists", async function(req, res, next) {
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
//GET ALL SHOPPINGLISTS
|
||||
|
||||
router.get("/shoppinglistsbylink", async function(req, res, next) {
|
||||
var token = req.query.idtoken;
|
||||
firebaseAdmin.auth().verifyIdToken(token)
|
||||
.then(async function(decodedToken) {
|
||||
uid = decodedToken.uid;
|
||||
console.log("uid", uid)
|
||||
try {
|
||||
//Get user id: req.session.passport.user.profile.id
|
||||
res.status(200).send(await postgres.getShoppinglistsByLink(req.query.link));
|
||||
}
|
||||
|
||||
catch(err) {
|
||||
res.status(400).send(await err);
|
||||
}
|
||||
|
||||
}).catch(function(error) {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
//POST new shoppinglist
|
||||
@ -197,6 +221,8 @@ router.get("/shoppinglist_json/:sl_id", async (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
postgres.displayShoppinglist("4tezJYMK");
|
||||
|
||||
//DELETE Shoppinglist
|
||||
|
Reference in New Issue
Block a user