diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-10 17:46:51 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-10 17:46:51 +0200 |
| commit | c13ff5b569248c0c2f05b154eda8199e0ce96cf8 (patch) | |
| tree | ebe215cb88d8d4adcc71a010baaf8fa56d621ef6 /API/Service | |
| parent | ef05575fa0d96544f06afc15851101c8304d1e04 (diff) | |
| download | DevHive-c13ff5b569248c0c2f05b154eda8199e0ce96cf8.tar DevHive-c13ff5b569248c0c2f05b154eda8199e0ce96cf8.tar.gz DevHive-c13ff5b569248c0c2f05b154eda8199e0ce96cf8.zip | |
Fully implemented UpdateUser in UserService
Diffstat (limited to 'API/Service')
| -rw-r--r-- | API/Service/UserService.cs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/API/Service/UserService.cs b/API/Service/UserService.cs index 2bd0bf0..bd991dd 100644 --- a/API/Service/UserService.cs +++ b/API/Service/UserService.cs @@ -45,13 +45,8 @@ namespace API.Service public async Task<HttpStatusCode> UpdateUser(int id, UserDTO userDTO) { - // TODO: add mapper (UserDTO to User) - User user = new User{ - Id = id, - FirstName = "Misho", - LastName = "Mishov", - UserName = "cheese" - }; + User user = this._userMapper.Map<User>(userDTO); + user.Id = id; await this._dbRepository.EditAsync(id, user); return HttpStatusCode.OK; |
