Exemplo n.º 1
0
        public async Task <IActionResult> UpdateUserProfile([FromBody] ProfileModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(new { message = AddErrors() }));
            }

            var result = await _userEngine.Update(User, model);

            if (!result.Succeeded)
            {
                return(BadRequest(new { message = result.StatusMessage }));
            }

            return(Ok(result));
        }