public async Task <Object> SignUpUserAsync([FromBody] UpdateApplicationUserRequest request) { try { request.UserRole = _appConfig["ApplicationSettings:userRoleName"]; var signUpResultModel = await _applicationUserService.CreateApplicationUserAsync(request); if (signUpResultModel is null) { return(BadRequest(new { message = "This username already taken" })); } return(Ok(signUpResultModel)); } catch (Exception ex) { return(BadRequest(new { message = ex.Message })); } }