mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
add writing exception in console
This commit is contained in:
@@ -69,13 +69,19 @@
|
|||||||
{
|
{
|
||||||
Response.Cookies.Append("melon", body["access_token"].ToString());
|
Response.Cookies.Append("melon", body["access_token"].ToString());
|
||||||
Response.Cookies.Append("watermelon", body["refresh_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 = new StringContent(JsonConvert.SerializeObject(new yaflay.ru.Controllers.HomeController.authorizeBody()
|
||||||
{
|
{
|
||||||
discordId = body["user"]["id"].ToString(),
|
discordId = body["user"]["id"].ToString(),
|
||||||
melon = body["access_token"].ToString(),
|
melon = body["access_token"].ToString(),
|
||||||
type = Auth.ApiKeyTypes.Public,
|
type = Auth.ApiKeyTypes.Public,
|
||||||
watermelon = body["watermelon"].ToString()
|
watermelon = body["watermelon"].ToString()
|
||||||
}));
|
}));
|
||||||
|
}catch(Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(body);
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
|
}
|
||||||
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
||||||
Response.Redirect("/authorize");
|
Response.Redirect("/authorize");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user