From 76be6dc8e71e5cd30b7c587476a38af5f89ba804 Mon Sep 17 00:00:00 2001 From: Amatsugu Date: Sun, 6 Jul 2025 01:43:14 -0400 Subject: [PATCH] Fix Auth info --- AobaServer/Services/AobaRpcService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AobaServer/Services/AobaRpcService.cs b/AobaServer/Services/AobaRpcService.cs index c5b4132..939849a 100644 --- a/AobaServer/Services/AobaRpcService.cs +++ b/AobaServer/Services/AobaRpcService.cs @@ -16,7 +16,7 @@ using System.Text.Json.Serialization; namespace AobaServer.Services; -public class AobaRpcService(AobaService aobaService, AccountsService accountsService, AuthInfo authInfo) : AobaRpc.AobaRpcBase +public class AobaRpcService(AobaService aobaService, AccountsService accountsService, AuthConfigService authConfig) : AobaRpc.AobaRpcBase { public override async Task GetMedia(Id request, ServerCallContext context) { @@ -37,6 +37,7 @@ public class AobaRpcService(AobaService aobaService, AccountsService accountsSer var user = await accountsService.GetUserAsync(userId, context.CancellationToken); if (user == null) return new ShareXResponse { Error = "User does not exist" }; + var authInfo = await authConfig.GetDefaultAuthInfoAsync(); var token = user.GetToken(authInfo); var dest = new ShareXDestination {