Refactored ui. Improved console experience. Added command endpoint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using MoonCore.Attributes;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.Models;
|
||||
using MoonlightServers.Shared.Http.Requests.Client.Servers;
|
||||
using MoonlightServers.Shared.Http.Requests.Client.Servers.Variables;
|
||||
using MoonlightServers.Shared.Http.Responses.Client.Servers;
|
||||
using MoonlightServers.Shared.Http.Responses.Client.Servers.Variables;
|
||||
@@ -59,6 +60,17 @@ public class ServerService
|
||||
);
|
||||
}
|
||||
|
||||
public async Task RunCommand(int serverId, string command)
|
||||
{
|
||||
await HttpApiClient.Post(
|
||||
$"api/client/servers/{serverId}/command",
|
||||
new ServerCommandRequest()
|
||||
{
|
||||
Command = command
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public async Task<ServerWebSocketResponse> GetWebSocket(int serverId)
|
||||
{
|
||||
return await HttpApiClient.GetJson<ServerWebSocketResponse>(
|
||||
|
||||
Reference in New Issue
Block a user