Started implementing variables tab and api controller

This commit is contained in:
2025-03-04 17:23:56 +01:00
parent fbf7cb554b
commit a2ffb561bd
7 changed files with 239 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
using System.ComponentModel.DataAnnotations;
namespace MoonlightServers.Shared.Http.Requests.Client.Servers.Variables;
public class UpdateServerVariableRangeRequest
{
[Required(ErrorMessage = "You need to provide variables")]
public UpdateServerVariableRequest[] Variables { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace MoonlightServers.Shared.Http.Requests.Client.Servers.Variables;
public class UpdateServerVariableRequest
{
[Required(ErrorMessage = "You need to provide a key")]
public string Key { get; set; }
[Required(ErrorMessage = "You need to provide a value", AllowEmptyStrings = true)]
public string Value { get; set; }
}

View File

@@ -0,0 +1,14 @@
using MoonlightServers.Shared.Enums;
namespace MoonlightServers.Shared.Http.Responses.Client.Servers.Variables;
public class ServerVariableDetailResponse
{
public string Key { get; set; }
public string Value { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public StarVariableType Type { get; set; }
public string? Filter { get; set; }
}