From 517f878d9fa231852748320898b666d683dbf82b Mon Sep 17 00:00:00 2001 From: SoSweetHam Date: Mon, 19 Jan 2026 11:06:31 +0530 Subject: [PATCH 1/5] fix: prohibit ename update pictique --- asd | 0 .../(protected)/settings/account/username/+page.svelte | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 asd diff --git a/asd b/asd deleted file mode 100644 index e69de29bb..000000000 diff --git a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte index 05faef8cd..43eb94953 100644 --- a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte @@ -29,8 +29,7 @@ try { await apiClient.patch('/api/users/', { handle, - avatar: profileImageDataUrl, - name + avatar: profileImageDataUrl }); saved = true; setTimeout(() => { @@ -87,8 +86,9 @@
- - + +

Auto-synced from your eVault real name

+

From 42d835a5ba0b898015d5733219887ad99fe170e0 Mon Sep 17 00:00:00 2001 From: SoSweetHam Date: Mon, 19 Jan 2026 15:41:59 +0530 Subject: [PATCH 2/5] fix: allow username edit, prohibit handle edit --- .../pictique-api/src/controllers/UserController.ts | 5 +++-- .../settings/account/username/+page.svelte | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/platforms/pictique-api/src/controllers/UserController.ts b/platforms/pictique-api/src/controllers/UserController.ts index edb9b9b16..2b939df54 100644 --- a/platforms/pictique-api/src/controllers/UserController.ts +++ b/platforms/pictique-api/src/controllers/UserController.ts @@ -172,7 +172,7 @@ export class UserController { updateProfile = async (req: Request, res: Response) => { try { const userId = req.user?.id; - const { handle, avatar, name } = req.body; + const { avatar, name } = req.body; if (!userId) { return res.status(401).json({ error: "Unauthorized" }); @@ -180,8 +180,9 @@ export class UserController { const user = await this.userService.findById(userId); + // Note: handle is not updatable to preserve eVault sync const updatedUser = await this.userService.updateProfile(userId, { - handle: handle ?? user?.handle, + handle: user?.handle, avatarUrl: avatar ?? user?.avatarUrl, name: name ?? user?.name, }); diff --git a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte index 43eb94953..d357e38e6 100644 --- a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte @@ -28,7 +28,7 @@ async function saveProfileData() { try { await apiClient.patch('/api/users/', { - handle, + name, avatar: profileImageDataUrl }); saved = true; @@ -81,14 +81,14 @@ {/if} -
- - -

Auto-synced from your eVault real name

- + +
+
+ +

From 3dcc92e8d5bfa5196facda57817de82b5ab57b61 Mon Sep 17 00:00:00 2001 From: SoSweetHam Date: Mon, 19 Jan 2026 15:44:17 +0530 Subject: [PATCH 3/5] fix: remove handle from upload obj in pictique altogether --- .../src/controllers/UserController.ts | 16 ++++++---------- .../pictique-api/src/services/UserService.ts | 5 ++--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/platforms/pictique-api/src/controllers/UserController.ts b/platforms/pictique-api/src/controllers/UserController.ts index 2b939df54..3fee4401f 100644 --- a/platforms/pictique-api/src/controllers/UserController.ts +++ b/platforms/pictique-api/src/controllers/UserController.ts @@ -52,13 +52,13 @@ export class UserController { // Parse and validate pagination parameters const pageNum = parseInt(page as string) || 1; const limitNum = Math.min(parseInt(limit as string) || 10, 50); // Cap at 50 results - + if (pageNum < 1 || limitNum < 1) { return res .status(400) .json({ error: "Invalid pagination parameters" }); } - + // Parse verified filter const verifiedOnly = verified === "true"; @@ -129,13 +129,13 @@ export class UserController { // Parse and validate pagination parameters const pageNum = parseInt(page as string) || 1; const limitNum = Math.min(parseInt(limit as string) || 10, 50); // Cap at 50 results - + if (pageNum < 1 || limitNum < 1) { return res .status(400) .json({ error: "Invalid pagination parameters" }); } - + // Parse verified filter const verifiedOnly = verified === "true"; @@ -178,13 +178,9 @@ export class UserController { return res.status(401).json({ error: "Unauthorized" }); } - const user = await this.userService.findById(userId); - - // Note: handle is not updatable to preserve eVault sync const updatedUser = await this.userService.updateProfile(userId, { - handle: user?.handle, - avatarUrl: avatar ?? user?.avatarUrl, - name: name ?? user?.name, + avatarUrl: avatar, + name, }); res.json(updatedUser); diff --git a/platforms/pictique-api/src/services/UserService.ts b/platforms/pictique-api/src/services/UserService.ts index 7fa47b669..d68f1bc13 100644 --- a/platforms/pictique-api/src/services/UserService.ts +++ b/platforms/pictique-api/src/services/UserService.ts @@ -423,15 +423,14 @@ export class UserService { async updateProfile( userId: string, - data: { handle?: string; avatarUrl?: string; name?: string } + data: { avatarUrl?: string; name?: string } ): Promise { const user = await this.userRepository.findOneBy({ id: userId }); if (!user) { throw new Error("User not found"); } - // Update only the fields that are provided - if (data.handle !== undefined) user.handle = data.handle; + // Update only the fields that are provided (handle is not updatable) if (data.avatarUrl !== undefined) user.avatarUrl = data.avatarUrl; if (data.name !== undefined) user.name = data.name; From fb178128f7f898e5537dd9d4e9a7b96f54f21903 Mon Sep 17 00:00:00 2001 From: Merul Dhiman <69296233+coodos@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:50:01 +0530 Subject: [PATCH 4/5] Update platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte --- .../routes/(protected)/settings/account/username/+page.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte index d357e38e6..d27e1ba95 100644 --- a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte @@ -83,7 +83,6 @@
-

Auto-synced from your eVault real name

From 48acfcd2387922a546e572ab20311b531df0a226 Mon Sep 17 00:00:00 2001 From: Merul Dhiman <69296233+coodos@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:50:08 +0530 Subject: [PATCH 5/5] Update platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte --- .../routes/(protected)/settings/account/username/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte index d27e1ba95..bb312accf 100644 --- a/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/settings/account/username/+page.svelte @@ -86,8 +86,8 @@
- - + +