Fix a stupid bug in GetAsync

This commit is contained in:
Mike Nolan 2024-10-19 00:43:27 -05:00
parent f21e23735d
commit 3e04d02707
1 changed files with 5 additions and 3 deletions

View File

@ -145,11 +145,12 @@ public class TYTDServer : Server
}
public override async Task GetAsync(ServerContext ctx)
{
Console.WriteLine(ctx.UrlPath);
if(onlyVideos)
{
string url=ctx.UrlPath.Substring(1);
string url=ctx.UrlAndQuery.Substring(1);
stk?.Push(url);
await ctx.SendTextAsync("<script>window.history.back();</script>");
}
@ -160,7 +161,8 @@ public class TYTDServer : Server
return;
}
string url=ctx.UrlPath.Substring(1);
string url=ctx.UrlAndQuery.Substring(1);
await cb(url);
await ctx.SendTextAsync("<script>window.history.back();</script>");