Expand rest info

This commit is contained in:
Ruby Rose 2017-03-19 20:49:48 +03:00
parent 42c7a2b030
commit 3dac79fcc6

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