diff options
Diffstat (limited to 'API/Service/UserService.cs')
| -rw-r--r-- | API/Service/UserService.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/API/Service/UserService.cs b/API/Service/UserService.cs index b9fe91d..e678b17 100644 --- a/API/Service/UserService.cs +++ b/API/Service/UserService.cs @@ -36,5 +36,21 @@ namespace API.Service User user = await this._dbRepository.FindByIdAsync(id); return JsonConvert.SerializeObject(user); } + + [HttpPut] + 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" + }; + await this._dbRepository.EditAsync(id, user); + + return HttpStatusCode.OK; + } + } } |
