Merge pull request #3 from yawaflua/yawaflua-debug-2612

merge branches
This commit is contained in:
Dima yawaflua Andreev
2024-01-11 13:49:57 +03:00
committed by GitHub

View File

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