Base solution for your next web application
Open Closed

Angular extra User Profile fields not saving #4814


User avatar
0
kythor created

Ok, a wierd one. I added some extra fields to User object, so people can enter their address,... so I also updated CurrentUserProfileEditDto Added new migration, update-database,...

On the angular side, did a nswag refresh.bat, added the fields to the modal popup for "My Settings".

Now when I save the settings, the extra fields are not saved. When debugging i can see that

save(): void {
        this.saving = true;
        this._profileService.updateCurrentUserProfile(this.user)

this.user contains ALL the fields with the correct data. but still nothing being saved.

when I look at the audit message, I get this for UpdateCurrentUserProfile:

{
    "input": {
        "name": "admin",
        "surname": "admin",
        "userName": "admin",
        "emailAddress": "[email protected]",
        "phoneNumber": "sddsds",
        "isPhoneNumberConfirmed": false,
        "timezone": null,
        "qrCodeSetupImageUrl": "",
        "isGoogleAuthenticatorEnabled": false
    }
}

The extra fields are somehow not in the input Json... I just don't see what i'm doing wrong here.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Kythor,

    Can you see the extra field on the server side (in UpdateCurrentUserProfile method) when you debug the source code ?