mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
set poster to backend from public to try function
This commit is contained in:
@@ -69,8 +69,9 @@
|
|||||||
{
|
{
|
||||||
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());
|
||||||
|
try
|
||||||
|
{
|
||||||
HttpContent bodytoApi;
|
HttpContent bodytoApi;
|
||||||
try{
|
|
||||||
bodytoApi = new StringContent(JsonConvert.SerializeObject(new yaflay.ru.Controllers.HomeController.authorizeBody()
|
bodytoApi = new StringContent(JsonConvert.SerializeObject(new yaflay.ru.Controllers.HomeController.authorizeBody()
|
||||||
{
|
{
|
||||||
discordId = body["user"]["id"].ToString(),
|
discordId = body["user"]["id"].ToString(),
|
||||||
@@ -78,12 +79,14 @@
|
|||||||
type = Auth.ApiKeyTypes.Public,
|
type = Auth.ApiKeyTypes.Public,
|
||||||
watermelon = body["watermelon"].ToString()
|
watermelon = body["watermelon"].ToString()
|
||||||
}));
|
}));
|
||||||
}catch(Exception ex)
|
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(body);
|
Console.WriteLine(body);
|
||||||
Console.WriteLine(ex.Message);
|
Console.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
var req = await Startup.client.PostAsync(path + "/api/authorize", bodytoApi);
|
|
||||||
Response.Redirect("/authorize");
|
Response.Redirect("/authorize");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user