Convert db to EF Core; start on view page

Also returning skills with profile inquiries now, though that particular query is failing (current WIP) #2
This commit is contained in:
2021-01-06 23:18:54 -05:00
parent 97b3de1cea
commit ef12da01dc
26 changed files with 515 additions and 508 deletions

View File

@@ -3,34 +3,4 @@
@inject NavigationManager nav
@inject AppState state
<p>@message</p>
@code {
string message = "Logging you on with No Agenda Social...";
protected override async Task OnInitializedAsync()
{
// Exchange authorization code for a JWT
var query = QueryHelpers.ParseQuery(nav.ToAbsoluteUri(nav.Uri).Query);
if (query.TryGetValue("code", out var authCode))
{
var logOnResult = await ServerApi.LogOn(http, authCode);
if (logOnResult.IsOk)
{
var logOn = logOnResult.Ok;
state.User = new UserInfo(logOn.CitizenId, logOn.Name);
state.Jwt = logOn.Jwt;
nav.NavigateTo("/citizen/dashboard");
}
else
{
message = logOnResult.Error;
}
}
else
{
message = "Did not receive a token from No Agenda Social (perhaps you clicked \"Cancel\"?)";
}
}
}
<p>@Message</p>