Now instead outputs json serialized objects.
This commit is contained in:
parent
59a2fcd62e
commit
e9c3363313
2 changed files with 14 additions and 7 deletions
|
|
@ -236,14 +236,19 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
//http://127.0.0.1:8080/users?type=status
|
||||
string usertest(IParameterCollection parameters, RequestEventArgs request)
|
||||
object usertest(IParameterCollection parameters, RequestEventArgs request)
|
||||
{
|
||||
var ret = new Dictionary<string, string>();
|
||||
var type = parameters["type"];
|
||||
if (type == null)
|
||||
return "Invalid Type";
|
||||
{
|
||||
ret.Add("Error", "Invalid Type");
|
||||
return ret;
|
||||
}
|
||||
if (type == "status")
|
||||
{
|
||||
return "Users online here";
|
||||
ret.Add("Users", "Info here");
|
||||
return ret;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue