Update StreamAdmin.cs
This commit is contained in:
parent
889dd5175d
commit
26cf38b87d
1 changed files with 3 additions and 1 deletions
|
|
@ -44,11 +44,13 @@ namespace BetterSecondBot.HttpService
|
||||||
return Failure("Endpointcode is empty", "FetchNextNotecard", new [] { endpoint, endpointcode });
|
return Failure("Endpointcode is empty", "FetchNextNotecard", new [] { endpoint, endpointcode });
|
||||||
}
|
}
|
||||||
|
|
||||||
string attempt_endpoint = endpoint + "endpoint.php";
|
string attempt_endpoint = endpoint + "sys.php";
|
||||||
token = helpers.GetSHA1(helpers.UnixTimeNow().ToString() + "notecardnext" + endpointcode);
|
token = helpers.GetSHA1(helpers.UnixTimeNow().ToString() + "notecardnext" + endpointcode);
|
||||||
var client = new RestClient(attempt_endpoint);
|
var client = new RestClient(attempt_endpoint);
|
||||||
var request = new RestRequest("notecard/next", Method.POST);
|
var request = new RestRequest("notecard/next", Method.POST);
|
||||||
|
string unixtime = helpers.UnixTimeNow().ToString();
|
||||||
request.AddParameter("token", token);
|
request.AddParameter("token", token);
|
||||||
|
request.AddParameter("unixtime", unixtime);
|
||||||
request.AddHeader("content-type", "application/x-www-form-urlencoded");
|
request.AddHeader("content-type", "application/x-www-form-urlencoded");
|
||||||
IRestResponse endpoint_checks = client.Post(request);
|
IRestResponse endpoint_checks = client.Post(request);
|
||||||
if (endpoint_checks.StatusCode != System.Net.HttpStatusCode.OK)
|
if (endpoint_checks.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue