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:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user