Fix database model associations and update API route

This commit is contained in:
newtbot
2024-01-27 20:15:29 +08:00
parent 6190cb63cd
commit d491750916
14 changed files with 61 additions and 164 deletions

View File

@ -7,7 +7,7 @@ const router = express.Router();
//getbyid
router.get("/me", async function (req, res, next) {
try {
let user = await getUserByID(req.user);
let user = await getUserByID(req.user); //req.user assigned in middleware!
//console.log(user);
res.json({
user: user,