private async Task<JsonRespondBody> RedirectJsonString(JsonRequestBody json)
{
if (String.Compare(json.Method, "login", true) == 0)
{
return await LoginMethod(json);
}
//Далее методы которым нужен токен
if (String.Compare(json.Method, "profile", true) == 0)
{
return ProfileMethod(json);
}
else if (String.Compare(json.Method, "dishlist", true) == 0)
{
return DishlistMethod(json);
}
else if (String.Compare(json.Method, "dishinfo", true) == 0)
{
return DishinfoMethod(json);
}
else if (String.Compare(json.Method, "offers", true) == 0)
{
return OffersMethod(json);
}
else if (String.Compare(json.Method, "orderinfo", true) == 0)
{
return OrderInfoMethod(json);
}
else if (String.Compare(json.Method, "orderlist", true) == 0)
{
return OrderListMethod(json);
}
else if (String.Compare(json.Method, "getcitylist", true) == 0)
{
return GetCityMethod(json);
}
else if (String.Compare(json.Method, "getcategorylist", true) == 0)
{
return GetCategoryList(json);
}
else if (String.Compare(json.Method, "getpricelimit", true) == 0)
{
return GetPriceLimit(json);
}
JsonRespondBody result = new JsonRespondBody { Error = "Invalid method", Status = "error" };
return result;
}