Add JavaScript files and edit profile CSS

1) finished edit profile with delete profile
This commit is contained in:
newtbot
2024-01-23 01:44:11 +08:00
parent d819ac71b2
commit 5b262eb803
14 changed files with 296 additions and 334 deletions

View File

@ -12,6 +12,7 @@ async function auth(req, res, next){
//get from db
let token = await apikeyModel.findByPk(rowid, {include: userModel});
if (!token) return false;
//compare
let isMatch = await comparePassword(suppliedToken, token.apikey);
@ -20,7 +21,7 @@ async function auth(req, res, next){
//else do logic
//pass hashed token to req.token (IMPORTANT ITS NOT PASSED TO CLIENT)
req.token = token
req.user = await token.getUser();
req.user = await token.getUser(); //taking user seq obj from usermodel
next();
}catch(error){
next(error);