This commit is contained in:
@@ -158,7 +158,7 @@ router.post("/upload-avatar", upload.single("image"), passport.authenticate('jwt
|
||||
router.get("/retrieve-avatar", async (req, res) => {
|
||||
try {
|
||||
const data = await User.findOne({ username: req.query.username });
|
||||
res.json({ status: "ok", image: data.image });
|
||||
res.json({ status: "ok", image: `${data.image}` });
|
||||
} catch (err) {
|
||||
res.json({ status: "error" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user