This commit is contained in:
13
CinemaWeb/Program.cs
Normal file
13
CinemaWeb/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Web;
|
||||
using CinemaWeb.Pages;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapGet("/", new SearchPage().ExecuteAsync);
|
||||
app.MapGet("/episodes/{id}/{title}", (string id, string title, HttpRequest req) => new EpisodesPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
||||
app.MapGet("/streams/{id}/{title}", (string id, string title, HttpRequest req) => new StreamsPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
||||
app.MapGet("/media/{id}/{title}", (string id, string title, HttpRequest req) => new MediaPage(id, HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
||||
app.MapGet("/link/{provider}/{ident}/{name}/{title}", (string provider, string ident, string name, string title, HttpRequest req) => new LinkPage(provider, HttpUtility.UrlDecode(ident), HttpUtility.UrlDecode(name), HttpUtility.UrlDecode(title)).ExecuteAsync(req));
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user