public async Task <IActionResult> UpdateUser([FromRoute] int id, [FromBody] User user) { if (!ModelState.IsValid) { } await _userRepository.UpdateUser(user.Username, user.Password, user.UserType, id); return(Ok()); }
public async Task <IActionResult> RegisterUser([FromBody] User user) { if (!ModelState.IsValid) { } var userId = await _userRepository.RegisterUser(user.Username, user.Password, user.UserType); return(Ok(userId)); }