public async Task <IActionResult> ByEmail(string email) { User result = await _userService.GetByEmailAsync(email); if (result == null) { return(NotFound()); } return(Ok(result)); }
public async Task <IActionResult> Save([FromBody] User user) { User result = await _userService.AddOrUpdateAsync(user); if (result == null) { return(BadRequest()); } return(Ok(result)); }
public async Task <IActionResult> ById(string id) { User result = await _userService.GetByIdAsync(id); if (result == null) { return(NotFound()); } return(Ok(result)); }