FINALLY WORKED CODE

This commit is contained in:
Дмитрий Шиманский
2023-10-19 20:48:06 +03:00
parent 4d6ee965ba
commit 97d04a201d
4 changed files with 11 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ namespace yaflay.ru.Новая_папка
}
// GET: HomeController/Details/5
[HttpGet("/r/{uri}")]
[HttpGet("{uri}")]
public async Task<IActionResult> fromGitHub(string? uri)
{

View File

@@ -41,7 +41,7 @@
<p align="left">For support me:</p>
<p align="center"> <a href="https://boosty.to/yaflay" align="left"><img src="https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA" ></a></p>
<p align="left"> My stats: </p>
<p align="center" class="stats streak"><a href="https://git.io/streak-stats" ><img src="http://github-readme-streak-stats.herokuapp.com?user=YaFlay&theme=dark&hide_border=true&locale=ru&date_format=j%20M%5B%20Y%5D&sideLabels=EB5454" alt="GitHub Streak" class="stats" align="middle" width="30%"/></a></p>
<p align="center" class="stats streak"><a href="https://git.io/streak-stats" ><img src="http://github-readme-streak-stats.herokuapp.com?user=YaFlay&theme=dark&hide_border=true&locale=ru&date_format=j%20M%5B%20Y%5D&sideLabels=EB5454" alt="GitHub Streak" class="stats" align="middle" /></a></p>
<p align="left"> My top-using languages: </p>
<p align="center" class="stats github"> <img src="https://github-readme-stats.vercel.app/api?username=YaFlay&layout=compact&bg_color=22272E&text_color=9F9F9F" class="stats"></p>
<p align="center" class="stats top_language"> <img src="https://github-readme-stats.vercel.app/api/top-langs/?username=YaFlay&layout=compact&bg_color=22272E&text_color=9F9F9F" class="stats" ></p>

View File

@@ -8,8 +8,9 @@ public class Program
private static IHostBuilder CreateHostBuilder()
{
return Host.CreateDefaultBuilder()
.ConfigureWebHost(webHost => {
.ConfigureWebHostDefaults(webHost => {
webHost.UseStartup<Startup>();
webHost.UseStaticWebAssets();
webHost.UseKestrel(kestrelOptions => { kestrelOptions.ListenAnyIP(80); });
});

View File

@@ -15,10 +15,10 @@ namespace yaflay.ru
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddRazorPages(k => { k.RootDirectory = "/Pages"; });
services.AddControllersWithViews();
services.AddDirectoryBrowser();
services.AddRouting();
services.AddRazorPages();
//services.AddDirectoryBrowser();
}
@@ -30,18 +30,17 @@ namespace yaflay.ru
// Configure the HTTP request pipeline.
app.UseStaticFiles();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapControllers();
});
}