Started implementing server share backend. Redesigned server authorization for api calls. Refactored controller names for servers. Moved some responses to correct namespace

This commit is contained in:
2025-06-05 23:35:39 +02:00
parent 4b1045d629
commit 1ec4450040
37 changed files with 1169 additions and 139 deletions

View File

@@ -2,8 +2,8 @@ using MoonCore.Attributes;
using MoonCore.Helpers;
using MoonCore.Models;
using MoonlightServers.Shared.Http.Requests.Client.Servers.Variables;
using MoonlightServers.Shared.Http.Responses.Client.Servers;
using MoonlightServers.Shared.Http.Responses.Client.Servers.Variables;
using MoonlightServers.Shared.Http.Responses.Users.Servers;
namespace MoonlightServers.Frontend.Services;
@@ -45,6 +45,13 @@ public class ServerService
);
}
public async Task<ServerStatsResponse> GetStats(int serverId)
{
return await HttpApiClient.GetJson<ServerStatsResponse>(
$"api/client/servers/{serverId}/stats"
);
}
public async Task<ServerWebSocketResponse> GetWebSocket(int serverId)
{
return await HttpApiClient.GetJson<ServerWebSocketResponse>(