public async Task <IActionResult> RegisterUserAsync([FromBody] RegisterViewModel registerViewModel) { if (!ModelState.IsValid) { return(Json(ModelState.DefaultInvalidModelStateWithErrorMessages())); } RegisterUserDto registerUserDto = registerViewModel.GetRegisterUserDto(); SignUpResultDto createIdentityResult = await _userService.SignUpAsync(registerUserDto); return(Json(createIdentityResult.Success ? new { success = true } : new { success = false })); }