From ac6127a64660d65c622888a328947efee47cbe29 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 07:50:16 +0000 Subject: [PATCH] bug: omit empty password from settings update payload The settings form always sent password: '' when the user only changed their bio or image, and the API rejects that with 422 ("password must be a string between 8 and 128 chars"), so no profile update could succeed without also setting a new password. Co-Authored-By: Gael Kekatos --- src/app/features/settings/settings.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/features/settings/settings.component.ts b/src/app/features/settings/settings.component.ts index 33e9ccea0..df7d6aaf4 100644 --- a/src/app/features/settings/settings.component.ts +++ b/src/app/features/settings/settings.component.ts @@ -60,8 +60,11 @@ export default class SettingsComponent implements OnInit { submitForm() { this.isSubmitting.set(true); + const { password, ...profile } = this.settingsForm.value; + const update = password ? { ...profile, password } : profile; + this.userService - .update(this.settingsForm.value) + .update(update) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe({ next: ({ user }) => void this.router.navigate(['/profile/', user.username]),