hotfix redirect system

add auth to create posts and redirects
This commit is contained in:
Дмитрий Шиманский
2023-12-26 13:16:03 +03:00
parent 38c12ca246
commit b9036e2165
12 changed files with 399 additions and 32 deletions

View File

@@ -6,8 +6,6 @@
string path = $"{this.Request.Scheme}://{this.Request.Host}";
if (Model.Id != 0)
{
//Blogs? Post = Startup.dbContext.Blogs.FirstOrDefault(k => k.Id == Model.Id);
var request = await Startup.client.GetAsync(path + "/api/Blog/" + Model.Id);
Blogs? Post = JsonConvert.DeserializeObject<Blogs>(request.Content.ReadAsStringAsync().Result);
if (Post == null)