Completed server variables in server crud
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.ServerVariables;
|
||||
|
||||
public class CreateServerVariableRequest
|
||||
{
|
||||
[Required(ErrorMessage = "You need to provide a key for the variable")]
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.ServerVariables;
|
||||
|
||||
public class UpdateServerVariableRequest
|
||||
{
|
||||
[Required(ErrorMessage = "You need to provide a key for the variable")]
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using MoonlightServers.Shared.Http.Requests.Admin.ServerVariables;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.Servers;
|
||||
|
||||
@@ -31,5 +32,5 @@ public class CreateServerRequest
|
||||
public int NodeId { get; set; }
|
||||
|
||||
public int[] AllocationIds { get; set; } = [];
|
||||
public Dictionary<string, string> Variables { get; set; } = new();
|
||||
public List<CreateServerVariableRequest> Variables { get; set; } = new();
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using MoonlightServers.Shared.Http.Requests.Admin.ServerVariables;
|
||||
|
||||
namespace MoonlightServers.Shared.Http.Requests.Admin.Servers;
|
||||
|
||||
@@ -31,4 +32,6 @@ public class UpdateServerRequest
|
||||
//public int NodeId { get; set; }
|
||||
|
||||
public int[] AllocationIds { get; set; } = [];
|
||||
|
||||
public List<UpdateServerVariableRequest> Variables { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user