fix: harden profile updates and localize public errors in Persian

Preserve actor and user profile fields during partial updates and validate supported personal data.

Add Persian HTTP error handling, validation translations, regression tests, and audit documentation.
This commit is contained in:
SepehrYahyaee
2026-11-04 12:03:04 +03:30
parent 255998097d
commit 2056412efe
16 changed files with 1627 additions and 205 deletions
+6 -2
View File
@@ -16,7 +16,7 @@ export class ProfileController {
@Get()
@UseGuards(GlobalGuard)
async getProfile(@CurrentUser() user) {
return await this.profileService.getProfileDetail(user.username);
return await this.profileService.getProfileDetail(user.username, user.sub);
}
@Patch()
@@ -26,6 +26,10 @@ export class ProfileController {
@CurrentUser() user,
@Body() body: UpdateUserProfileDtoRq,
) {
return await this.profileService.updateProfile(user.username, body);
return await this.profileService.updateProfile(
user.username,
body as Record<string, unknown>,
user.sub,
);
}
}