@using System.Text.Json.Nodes
@ViewData["Title"] - @Context.Request.Host.Host
@if (!Context.Request.Path.ToString().StartsWith("/Blog/")) {
} else if (Context.Request.Path.ToString().StartsWith("/Blog/")) {
}
@Context.Request.Host.Host
Home
Privacy
Blog
@{ Context.Response.Cookies.Delete("cable"); if (Context.Request.Cookies["melon"] != null) { HttpResponseMessage message; using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, "https://discordapp.com/api/oauth2/@me")) { requestMessage.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", Context.Request.Cookies["melon"]); ; message = await Startup.client.SendAsync(requestMessage); } string responseBody = await message.Content.ReadAsStringAsync(); JsonNode response = JsonNode.Parse(responseBody); if (!response["user"].isNull()) { Context.Response.Cookies.Append("cable", response["user"]["id"].ToString()); string userName = response["user"]["global_name"].ToString();
@userName
} } }
@{ if (!Context.Request.Host.Host.StartsWith("yawaflua.ru")) {
@Context.Request.Host.Host
Now
This site is outdated. Use
new site
} }
@RenderBody()
@if (Context.Request.Path.ToString().StartsWith("/AdminPanel")) { } @await RenderSectionAsync("Scripts", required: false)