users and profiles working

This commit is contained in:
Adolfo Reyna
2021-09-02 09:59:58 -07:00
parent a7ca68e6df
commit ba2b0bcbd6
4 changed files with 28 additions and 2 deletions

View File

@@ -11,6 +11,15 @@ DB.getDB.then((DB)=>{
return DB.ObjectID(user_sid);
}
router.get("/mine", async (req, res) => {
let userid = req.cookies.user_sid;
let profiles = await DB.getUserProfiles(userid);
return res.json({
status: "ok",
profiles
});
});
router.get("/new", async (req, res) => {
let profile = {
userid: getUserId(req),