import Inject from "@entity-access/entity-access/dist/di/di.js"; import Page from "@entity-access/server-pages/dist/Page.js"; import ChannelPageService from "../../../server/services/channels/ChannelPageService.js"; import WebSiteContentService from "../../../server/services/files/WebSiteContentService.js"; export default class extends Page { @Inject websiteService: WebSiteContentService; @Inject channelPageService: ChannelPageService; async run() { const host = this.request.host; const appFile = await this.websiteService.getNamedPageContent(host, ["shop.html", "store.html"]); if (!appFile) { return this.notFound(); } const body = await appFile.readAsText(); // const body = await this.channelPageService.modifyPage({ // host, // url: this.request.URL.toString(), // blogID, // emailID, // file // }); // this.cacheControl = "public, max-age=3600, immutable"; return this.content({ body, contentType: "text/html" }); } }