Example #1
0
        public async Task <IHttpActionResult> UpdateUser([FromBody] UserDTO user)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            UserDTO updatedUser = await _manager.UpdateUserAsync(user);

            if (updatedUser != null)
            {
                return(BadRequest("An error has accured while attempting to update the user."));
            }
            return(Ok(updatedUser));
        }