Skip to content

Commit

Permalink
fix: fix merge bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronchan32 committed Apr 10, 2024
1 parent 6af0829 commit 9bb897f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 9 additions & 4 deletions backend/src/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,15 @@ export const loginUser = async (
if (!user) {
throw ValidationError.USER_NOT_FOUND;
}

res
.status(200)
.json({ uid: user._id, role: user.accountType, approvalStatus: user.approvalStatus });
res.status(200).json({
uid: user._id,
role: user.accountType,
approvalStatus: user.approvalStatus,
profilePicture: user.profilePicture,
name: user.name,
email: user.email,
lastChangedPassword: user.lastChangedPassword,
});
return;
} catch (e) {
nxt();
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/pages/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export default function Profile() {
if (!piaUser) return;
if (piaUser.profilePicture === "default") {
setBasicInfoData((prev) => ({ ...prev, image: "default" }));
return;
}
if (piaUser.profilePicture) {
} else if (piaUser.profilePicture) {
getPhoto(piaUser.profilePicture).then(
(result) => {
if (result.success) {
Expand Down

0 comments on commit 9bb897f

Please sign in to comment.