mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2025-12-09 20:19:32 +02:00
@@ -69,14 +69,24 @@
|
||||
{
|
||||
Response.Cookies.Append("melon", body["access_token"].ToString());
|
||||
Response.Cookies.Append("watermelon", body["refresh_token"].ToString());
|
||||
HttpContent bodytoApi = new StringContent(JsonConvert.SerializeObject(new yaflay.ru.Controllers.HomeController.authorizeBody()
|
||||
try
|
||||
{
|
||||
HttpContent bodytoApi;
|
||||
bodytoApi = new StringContent(JsonConvert.SerializeObject(new yaflay.ru.Controllers.HomeController.authorizeBody()
|
||||
{
|
||||
discordId = body["user"]["id"].ToString(),
|
||||
melon = body["access_token"].ToString(),
|
||||
type = Auth.ApiKeyTypes.Public,
|
||||
watermelon = body["watermelon"].ToString()
|
||||
}));
|
||||
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
||||
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine(body);
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
Response.Redirect("/authorize");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user