try to fix using string[]

This commit is contained in:
Дмитрий Шиманский
2023-12-23 00:07:13 +03:00
parent 799e435afc
commit 01cd487a0d
3 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ namespace yaflay.ru.Новая_папка
}
string responseBody = await message.Content.ReadAsStringAsync();
JsonNode response = JsonNode.Parse(responseBody);
if (response["user"] != null || Startup.ownerId.FirstOrDefault(k => k.Equals(response["user"]?["id"].ToString())) == null)
if (response["user"] != null || Startup.ownerId.FirstOrDefault(k => k == (response["user"]?["id"].ToString())) == null)
{
Redirects redirects = new()
{
@@ -73,7 +73,7 @@ namespace yaflay.ru.Новая_папка
}
string responseBody = await message.Content.ReadAsStringAsync();
JsonNode response = JsonNode.Parse(responseBody);
if (response["user"] != null || Startup.ownerId.FirstOrDefault(k => k.Equals(response["user"]?["id"].ToString())) == null )
if (response["user"] != null || Startup.ownerId.FirstOrDefault(k => k == (response["user"]?["id"].ToString())) == null )
{
try
{

View File

@@ -8,7 +8,7 @@
@if (Request.Cookies["melon"] != null)
{
if (Startup.ownerId.FirstOrDefault(k => k.Equals(Request.Cookies["cable"])) == null)
if (Startup.ownerId.FirstOrDefault(k => k == (Request.Cookies["cable"])) == null)
{
<h1 align="center">Вы не авторизованы! Сасни хуйца, олух</h1>
isAllowed = false;

View File

@@ -4,7 +4,7 @@
@{
ViewData["Title"] = "Authorize";
string authorizationUrl = $"https://discord.com/api/oauth2/authorize?client_id={Startup.clientId}&response_type=code&redirect_uri={Startup.redirectUrl}&scope=identify";
<p style="display:none;">Data: @Startup.clientId @Startup.redirectUrl @String.Join(",", Startup.ownerId) @Model.code</p>
<p style="display:none;">Data: @Startup.clientId @Startup.redirectUrl [@String.Join(",", Startup.ownerId)] @Model.code</p>
if (Model.code == null)
{
if (Request.Cookies["melon"]?.ToString() == null)