about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/InvalidSession.razor
diff options
context:
space:
mode:
authorEmma@Rory& <root@rory.gay>2023-09-15 09:55:36 +0200
committerEmma@Rory& <root@rory.gay>2023-09-15 09:55:36 +0200
commite10fa389ce3c4d42deadfec8bf08c2fbb1a88d79 (patch)
tree1e2f8d8de07c6037ac4aa20be3b54ac43c2d7f2e /MatrixRoomUtils.Web/Pages/InvalidSession.razor
parentCode cleanup (diff)
downloadMatrixUtils-e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79.tar.xz
Refactors
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/InvalidSession.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/InvalidSession.razor7
1 files changed, 3 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Pages/InvalidSession.razor b/MatrixRoomUtils.Web/Pages/InvalidSession.razor
index f555be5..310abb1 100644
--- a/MatrixRoomUtils.Web/Pages/InvalidSession.razor
+++ b/MatrixRoomUtils.Web/Pages/InvalidSession.razor
@@ -1,5 +1,4 @@
 @page "/InvalidSession"
-@using MatrixRoomUtils.Web.Shared.SimpleComponents
 @using LibMatrix.Responses
 @using LibMatrix
 
@@ -33,7 +32,7 @@ else {
     [SupplyParameterFromQuery(Name = "ctx")]
     public string Context { get; set; }
 
-    private LoginResponse? _login { get; set; }
+    private UserAuth? _login { get; set; }
 
     private bool _showRefreshDialog { get; set; }
 
@@ -70,7 +69,7 @@ else {
         await Task.CompletedTask;
     }
 
-    private async Task SwitchSession(LoginResponse auth) {
+    private async Task SwitchSession(UserAuth auth) {
         Console.WriteLine($"Switching to {auth.Homeserver} {auth.AccessToken} {auth.UserId}");
         await MRUStorage.SetCurrentToken(auth);
         await OnInitializedAsync();
@@ -79,7 +78,7 @@ else {
     private async Task TryLogin() {
         if(_login is null) throw new NullReferenceException("Login is null!");
         try {
-            var result = await HomeserverProvider.Login(_login.Homeserver, _login.UserId, _password);
+            var result = new UserAuth(await HomeserverProvider.Login(_login.Homeserver, _login.UserId, _password));
             if (result is null) {
                 Console.WriteLine($"Failed to login to {_login.Homeserver} as {_login.UserId}!");
                 return;