summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authormetamuffin <metamuffin@yandex.com>2022-01-01 14:25:35 +0100
committermetamuffin <metamuffin@yandex.com>2022-01-01 14:25:35 +0100
commita8c6fd847873ae521276a256d05fe160883d6649 (patch)
treec187feb246b41c39a54e306d0605af39034e9ad9 /source
parent382808301ffb28397a7e2c18f27c09adc42b3c4e (diff)
downloadmetamuffin-website-a8c6fd847873ae521276a256d05fe160883d6649.tar
metamuffin-website-a8c6fd847873ae521276a256d05fe160883d6649.tar.bz2
metamuffin-website-a8c6fd847873ae521276a256d05fe160883d6649.tar.zst
js reminder simplified
Diffstat (limited to 'source')
-rw-r--r--source/index.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/index.ts b/source/index.ts
index 3a5bf26..f74bb94 100644
--- a/source/index.ts
+++ b/source/index.ts
@@ -11,12 +11,10 @@ const renderEnv = {
}
const templates: Map<string, compileTemplate> = new Map()
-async function render(response: Response, request: Request, name: string) {
+async function render(response: Response, _request: Request, name: string) {
const template = templates.get(name) ?? compile(await Deno.readTextFile(`./views/${name}.pug`), { filename: `./views/${name}.pug`, name: name })
templates.set(name, template)
- const js = request.url.search == "?with-evil-javascript-enabled"
- response.body = template({ js, ...renderEnv })
-
+ response.body = template({ ...renderEnv })
}
router.get("/", ({ response }) => response.redirect("/about"))