Now instead outputs json serialized objects.

This commit is contained in:
high 2011-09-04 23:50:35 -04:00
parent 59a2fcd62e
commit e9c3363313
2 changed files with 14 additions and 7 deletions

View file

@ -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;
}