You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is weird because I order it to save before sending back data.
if you have any recommendations or fixes feel free.
Code:
/** * This will be used to authenticate and retrieve user information */api.post('/user',async(req,res)=>{id=req.body.idpassword=req.body.passwordrememberMe=req.body.rememberMeconstdata=awaitauth.login(id,password)if(!data){return}req.session.token=data.idif(!rememberMe){req.session.cookie.maxAge=900000}req.session.save((err)=>{if(!err){res.json(data)}else{res.json({})}})})
Database:
The text was updated successfully, but these errors were encountered:
which is weird because I order it to save before sending back data.
if you have any recommendations or fixes feel free.
Code:
Database:
The text was updated successfully, but these errors were encountered: