Code cleanup

This commit is contained in:
2026-01-28 22:39:29 +01:00
parent fc8d59ae12
commit 0878d0885a
4 changed files with 10 additions and 19 deletions

View File

@@ -2,8 +2,6 @@
@using Sandbox.Models.ViewModels
@inject Sandbox.App.Services.AuthService.IAuthService AuthService
@* @inject AuthenticationStateProvider AuthenticationStateProvider *@
@* @inject NavigationManager NavigationManager *@
<title>Register</title>
@@ -52,8 +50,6 @@
@code {
[SupplyParameterFromForm] private UserRegister user { get; set; }
//HttpClient _http = new() { BaseAddress = new("https://localhost:7122") };
private string message = string.Empty;
private string messageCssClass = string.Empty;
private string errorMessage = string.Empty;
@@ -62,8 +58,6 @@
async Task HandleRegistration()
{
// var response = await _http.PostAsJsonAsync("/api/register", user);
// var result = await response.Content.ReadFromJsonAsync<ServiceResponse<int>>();
var result = await AuthService.Register(user);
message = result.Message;
messageCssClass = result.Success ? "text-success" : "text-danger";