nexusbert commited on
Commit
04d6472
·
1 Parent(s): 86ec647
Files changed (2) hide show
  1. src/routes/profile.ts +3 -3
  2. stylegptUI +1 -1
src/routes/profile.ts CHANGED
@@ -72,7 +72,7 @@ router.get("/", authenticateToken, async (req: AuthRequest, res) => {
72
  id: user.id,
73
  name: user.name,
74
  email: user.email,
75
- profilePicture: user.profilePicture || null,
76
  createdAt: user.createdAt,
77
  },
78
  });
@@ -143,7 +143,7 @@ router.put("/", authenticateToken, upload.single("profilePicture"), async (req:
143
  } catch (deleteError) {
144
  console.error("Error deleting old profile picture:", deleteError);
145
  }
146
- user.profilePicture = null;
147
  }
148
 
149
  // Handle profile picture upload
@@ -190,7 +190,7 @@ router.put("/", authenticateToken, upload.single("profilePicture"), async (req:
190
  id: user.id,
191
  name: user.name,
192
  email: user.email,
193
- profilePicture: user.profilePicture || null,
194
  createdAt: user.createdAt,
195
  },
196
  });
 
72
  id: user.id,
73
  name: user.name,
74
  email: user.email,
75
+ profilePicture: user.profilePicture || undefined,
76
  createdAt: user.createdAt,
77
  },
78
  });
 
143
  } catch (deleteError) {
144
  console.error("Error deleting old profile picture:", deleteError);
145
  }
146
+ user.profilePicture = undefined;
147
  }
148
 
149
  // Handle profile picture upload
 
190
  id: user.id,
191
  name: user.name,
192
  email: user.email,
193
+ profilePicture: user.profilePicture || undefined,
194
  createdAt: user.createdAt,
195
  },
196
  });
stylegptUI CHANGED
@@ -1 +1 @@
1
- Subproject commit 0179f6b962a58bc9e4f7b35be623df9395a3aa17
 
1
+ Subproject commit 824ad808aa6752cee381be70079e9970d56b5c7e