Merge pull request #1414 from deadsurgeon42/general-devel

Add banning user and ban date fields to ban info and list endpoints
This commit is contained in:
Chris 2017-03-27 15:43:58 +10:30 committed by GitHub
commit 33178ad2b3

View file

@ -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))]