diff --git a/src/controllers/userController.js b/src/controllers/userController.js index 6386f657..f6dc5db9 100644 --- a/src/controllers/userController.js +++ b/src/controllers/userController.js @@ -301,6 +301,7 @@ exports.loginUser = async (req, fcmIds, deviceId) => { } } + // If no user or staff found, return invalid credentials if (!user) return { same: false }; diff --git a/src/index.js b/src/index.js index 54541cde..f7fa9ba1 100644 --- a/src/index.js +++ b/src/index.js @@ -251,6 +251,7 @@ fastify.post("/api/login", { }, }; + if (profilePicture) { responsePayload.simplydata.picture = profilePicture.picture; }