...
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
@page "/Verification/{ID:int}"
|
||||
@inject HttpClient _hc
|
||||
@inject NavigationManager nav
|
||||
@inject UserAuthenticationDTO userinfo
|
||||
<PageTitle>احراز هویت</PageTitle>
|
||||
<main>
|
||||
|
||||
@@ -123,7 +124,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowDangerAlert(await request.Content.ReadFromJsonAsync<string>());
|
||||
var listerror = await request.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(listerror[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -146,9 +148,16 @@
|
||||
nav.NavigateTo("/Sign-in/VerificationRegister");
|
||||
else if (VerificationCodeModel.Type == "ForgetPassword")
|
||||
nav.NavigateTo("/Sign-in/VerificationFrogetPass");
|
||||
else if (VerificationCodeModel.Type == "ChangeUserName")
|
||||
{
|
||||
userinfo.UserName = VerificationCodeModel.val;
|
||||
|
||||
nav.NavigateTo("/Profile/Verification");
|
||||
}
|
||||
|
||||
else
|
||||
nav.NavigateTo("/");
|
||||
|
||||
nav.NavigateTo("/");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -158,7 +167,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowDangerAlert(await request.Content.ReadFromJsonAsync<string>());
|
||||
var listerror = await request.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(listerror[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +191,8 @@
|
||||
{
|
||||
if (!successfull)
|
||||
await _hc.DeleteAsync($"Verification/Remove/{VerificationCodeModel?.ID}");
|
||||
|
||||
if (VerificationCodeModel.Type == "ChangeUserName")
|
||||
nav.NavigateTo("/Profile");
|
||||
nav.NavigateTo("/");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user