Neuer commit
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
@page "/login"
|
||||
@using OnProfNext.Client.Services
|
||||
@using OnProfNext.Shared.Models
|
||||
@inject HttpClient Http
|
||||
@inject NavigationManager Nav
|
||||
@inject IJSRuntime JS
|
||||
@inject AuthService AuthService
|
||||
|
||||
<h3>Anmeldung</h3>
|
||||
|
||||
@@ -45,8 +47,8 @@
|
||||
}
|
||||
|
||||
var result = await response.Content.ReadFromJsonAsync<LoginResponse>();
|
||||
await JS.InvokeVoidAsync("localStorage.setItem", "authToken", result!.Token);
|
||||
|
||||
await AuthService.LoginAsync(result!.Token);
|
||||
Nav.NavigateTo("/users");
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user