diff options
Diffstat (limited to 'API/Service')
| -rw-r--r-- | API/Service/UserService.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/API/Service/UserService.cs b/API/Service/UserService.cs index bd991dd..d84d74b 100644 --- a/API/Service/UserService.cs +++ b/API/Service/UserService.cs @@ -20,11 +20,8 @@ namespace API.Service public UserService(DevHiveContext context, IMapper mapper) { this._dbRepository = new DbRepository<User>(context); - this._userMapper = new Mapper - ( - new MapperConfiguration - (cfg => cfg.CreateMap<UserDTO, User>()) - ); + this._userMapper = new Mapper(new MapperConfiguration(cfg => + cfg.CreateMap<UserDTO, User>())); } public async Task<HttpStatusCode> CreateUser(UserDTO userDTO) @@ -46,7 +43,6 @@ namespace API.Service public async Task<HttpStatusCode> UpdateUser(int id, UserDTO userDTO) { User user = this._userMapper.Map<User>(userDTO); - user.Id = id; await this._dbRepository.EditAsync(id, user); return HttpStatusCode.OK; |
