update dependencies
This commit is contained in:
@@ -34,7 +34,7 @@ public class ChatController : WebApiController, IChatController
|
||||
private static readonly MethodInfo SingleTargetMethod = null!;
|
||||
|
||||
[Route(HttpVerbs.Post, $"{RootPath}/message")]
|
||||
public void SendMessage([JsonData] ChatMessageRequest request)
|
||||
public void SendMessage([JsonBody] ChatMessageRequest request)
|
||||
{
|
||||
if (MyMultiplayer.Static is null)
|
||||
throw new HttpException(HttpStatusCode.ServiceUnavailable);
|
||||
@@ -84,7 +84,7 @@ public class ChatController : WebApiController, IChatController
|
||||
}
|
||||
|
||||
[Route(HttpVerbs.Post, $"{RootPath}/command")]
|
||||
public async Task InvokeCommand([JsonData] ChatCommandRequest request)
|
||||
public async Task InvokeCommand([JsonBody] ChatCommandRequest request)
|
||||
{
|
||||
if (Statics.CommandManager is null)
|
||||
throw new HttpException(HttpStatusCode.ServiceUnavailable);
|
||||
|
@@ -35,7 +35,7 @@ public class ServerController : WebApiController, IServerController
|
||||
}
|
||||
|
||||
[Route(HttpVerbs.Post, $"{RootPath}/stop")]
|
||||
public async Task Stop([JsonData] StopServerRequest request)
|
||||
public async Task Stop([JsonBody] StopServerRequest request)
|
||||
{
|
||||
if (!Statics.Torch.IsRunning)
|
||||
throw HttpException.BadRequest($"Server can't stop in state {Statics.Torch.State}", Statics.Torch.State);
|
||||
@@ -60,7 +60,7 @@ public class ServerController : WebApiController, IServerController
|
||||
}
|
||||
|
||||
[Route(HttpVerbs.Post, $"{RootPath}/settings")]
|
||||
public async Task SetSettings([JsonData] ServerSettings request)
|
||||
public async Task SetSettings([JsonBody] ServerSettings request)
|
||||
{
|
||||
var settings = Statics.Torch.DedicatedInstance.DedicatedConfig;
|
||||
|
||||
|
@@ -33,7 +33,7 @@ public class SettingsController : WebApiController, ISettingsController
|
||||
}
|
||||
|
||||
[Route(HttpVerbs.Get, $"{RootPath}/{{fullName}}/values")]
|
||||
public IEnumerable<PropertyBase> GetValues(string fullName, [JsonData] IEnumerable<string> propertyNames)
|
||||
public IEnumerable<PropertyBase> GetValues(string fullName, [JsonBody] IEnumerable<string> propertyNames)
|
||||
{
|
||||
if (!Statics.SettingManager.Settings.TryGetValue(fullName, out var setting))
|
||||
throw HttpException.NotFound($"Setting with fullName {fullName} not found", fullName);
|
||||
@@ -76,7 +76,7 @@ public class SettingsController : WebApiController, ISettingsController
|
||||
}
|
||||
|
||||
[Route(HttpVerbs.Patch, $"{RootPath}/{{fullName}}/values")]
|
||||
public int Patch(string fullName, [JsonData] IEnumerable<PropertyBase> properties)
|
||||
public int Patch(string fullName, [JsonBody] IEnumerable<PropertyBase> properties)
|
||||
{
|
||||
if (!Statics.SettingManager.Settings.TryGetValue(fullName, out var setting))
|
||||
throw HttpException.NotFound($"Setting with fullName {fullName} not found", fullName);
|
||||
|
Reference in New Issue
Block a user