diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-26 11:44:41 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-26 11:44:41 +0200 |
| commit | df52b1068e16adc50ffd365e2e8b8ea19b59fac3 (patch) | |
| tree | 3636d4b3fe2d5f88817b11007ff573c1ea920e0a /src/DevHive.Services/Configurations/Mapping/UserMappings.cs | |
| parent | d2bc08c0dcd6f0dc0822333bbb00c9fc851f49cb (diff) | |
| download | DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar.gz DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.zip | |
UserUpdate does not allow updating roles if not admin; HTTP Put now works properly; UserUpdate validates properly
Diffstat (limited to 'src/DevHive.Services/Configurations/Mapping/UserMappings.cs')
| -rw-r--r-- | src/DevHive.Services/Configurations/Mapping/UserMappings.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/DevHive.Services/Configurations/Mapping/UserMappings.cs b/src/DevHive.Services/Configurations/Mapping/UserMappings.cs index 6797ce1..096af38 100644 --- a/src/DevHive.Services/Configurations/Mapping/UserMappings.cs +++ b/src/DevHive.Services/Configurations/Mapping/UserMappings.cs @@ -11,11 +11,10 @@ namespace DevHive.Services.Configurations.Mapping { CreateMap<UserServiceModel, User>(); CreateMap<RegisterServiceModel, User>(); + CreateMap<FriendServiceModel, User>(); CreateMap<UpdateUserServiceModel, User>() .AfterMap((src, dest) => dest.PasswordHash = PasswordModifications.GeneratePasswordHash(src.Password)); - CreateMap<FriendServiceModel, User>(); - CreateMap<UpdateFriendServiceModel, User>() - .ForMember(dest => dest.UserName, src => src.MapFrom(p => p.Name)); + CreateMap<UpdateFriendServiceModel, User>(); CreateMap<User, UserServiceModel>(); CreateMap<User, UpdateUserServiceModel>() |
