Fixed the REST kick endpoint expecting a player parameter as opposed to a verb
This commit is contained in:
parent
ff84198e32
commit
bfc9ad98fb
3 changed files with 4 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ using System.IO;
|
||||||
|
|
||||||
namespace TShockAPI
|
namespace TShockAPI
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
public enum LogLevel
|
public enum LogLevel
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ namespace TShockAPI
|
||||||
private object PlayerKick(RestVerbs verbs, IParameterCollection parameters)
|
private object PlayerKick(RestVerbs verbs, IParameterCollection parameters)
|
||||||
{
|
{
|
||||||
var returnBlock = new Dictionary<string, object>();
|
var returnBlock = new Dictionary<string, object>();
|
||||||
var playerParam = parameters["player"];
|
var playerParam = verbs["player"];
|
||||||
var found = TShock.Utils.FindPlayer(playerParam);
|
var found = TShock.Utils.FindPlayer(playerParam);
|
||||||
var reason = verbs["reason"];
|
var reason = verbs["reason"];
|
||||||
if (found.Count == 0)
|
if (found.Count == 0)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
@ -121,7 +122,7 @@ namespace TShockAPI
|
||||||
"TShock was improperly shut down. Please avoid this in the future, world corruption may result from this.");
|
"TShock was improperly shut down. Please avoid this in the future, world corruption may result from this.");
|
||||||
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
File.Delete(Path.Combine(SavePath, "tshock.pid"));
|
||||||
}
|
}
|
||||||
File.WriteAllText(Path.Combine(SavePath, "tshock.pid"), Process.GetCurrentProcess().Id.ToString());
|
File.WriteAllText(Path.Combine(SavePath, "tshock.pid"), Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture));
|
||||||
|
|
||||||
ConfigFile.ConfigRead += OnConfigRead;
|
ConfigFile.ConfigRead += OnConfigRead;
|
||||||
FileTools.SetupConfig();
|
FileTools.SetupConfig();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue