public async Task <IActionResult> Test([FromBody] AuthRegisterInputModel registerInfo) { return(Ok(new AuthResultModel() { Message = "Test" })); }
public async Task <IActionResult> Register([FromBody] AuthRegisterInputModel registerInfo) { if (await _userService.RegisterAsync( _mapper.Map <AuthRegisterInputModel, AuthRegisterDto>(registerInfo))) { return(Ok(new AuthResultModel() { Message = "Registered" })); } return(BadRequest(new AuthResultModel { Message = "Username is already taken" })); }