add userid to getuser endpoint

This commit is contained in:
Mystikfluu 2023-02-15 20:08:05 +01:00
parent 74c2a4d294
commit 1519e541b8

View File

@ -50,7 +50,7 @@ export const setup = function (router, con, server) {
}); });
}); });
router.get("/api/getuser", function (_req, res) { router.get("/api/getuser", function (_req, res) {
res.json({ "username": res.locals.username, "bio": res.locals.bio, "avatar": res.locals.avatar }); res.json({ "username": res.locals.username, "bio": res.locals.bio, "avatar": res.locals.avatar, "userid": res.locals.userid });
}); });
router.get("/api/getalluserinformation", function (req, res) { router.get("/api/getalluserinformation", function (req, res) {
res.set("Access-Control-Allow-Origin", ""); //we don't want that here res.set("Access-Control-Allow-Origin", ""); //we don't want that here