From 3dac79fcc6e13ddaba694183495a809a68ec7815 Mon Sep 17 00:00:00 2001 From: Ruby Rose Date: Sun, 19 Mar 2017 20:49:48 +0300 Subject: [PATCH] Expand rest info --- TShockAPI/Rest/RestManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index e05d7ba9..add24b67 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -706,6 +706,8 @@ namespace TShockAPI return new RestObject() { {"name", null == ban.Name ? "" : ban.Name}, {"ip", null == ban.IP ? "" : ban.IP}, + {"banning_user", null == ban.BanningUser ? "" : ban.BanningUser}, + {"date", null == ban.BanDateTime ? "" : ban.BanDateTime.Value.ToString()}, {"reason", null == ban.Reason ? "" : ban.Reason}, }; } @@ -724,6 +726,8 @@ namespace TShockAPI { {"name", null == ban.Name ? "" : ban.Name}, {"ip", null == ban.IP ? "" : ban.IP}, + {"banning_user", null == ban.BanningUser ? "" : ban.BanningUser}, + {"date", null == ban.BanDateTime ? "" : ban.BanDateTime.Value.ToString()}, {"reason", null == ban.Reason ? "" : ban.Reason}, } ); @@ -735,7 +739,7 @@ namespace TShockAPI #endregion #region Rest World Methods - + [Route("/v2/world/autosave/state/{state}")] [Permission(RestPermissions.restcfg)] [Verb("state", "The status for autosave.", typeof(bool))]