get creation of links working

This commit is contained in:
2024-10-02 18:01:54 -04:00
parent d98f589031
commit 2b63dc62fc
15 changed files with 659 additions and 123 deletions

View File

@@ -0,0 +1,19 @@
import { Controller } from "@tsed/di";
import { HeaderParams } from "@tsed/platform-params";
import { View } from "@tsed/platform-views";
import { Hidden, Get, Returns } from "@tsed/schema";
@Hidden()
@Controller("/app")
export class AppController {
@Get("/")
@View("app/send.ejs")
@(Returns(200, String).ContentType("text/html"))
get(@HeaderParams("x-forwarded-proto") protocol: string, @HeaderParams("host") host: string) {
const hostUrl = `${protocol || "http"}://${host}`;
return {
BASE_URL: hostUrl
};
}
}