From 23a6484e20960071aa8c2871dcf543256cccd8af Mon Sep 17 00:00:00 2001
From: Artemy
Date: Tue, 15 Aug 2023 13:11:09 +0300
Subject: [PATCH] feat: dynamic engine list in start page
---
src/routes/start.ts | 3 ++-
templates/start.ejs | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/routes/start.ts b/src/routes/start.ts
index 06fc883..1bf780b 100644
--- a/src/routes/start.ts
+++ b/src/routes/start.ts
@@ -1,7 +1,8 @@
import { FastifyInstance } from "fastify";
+import { engineList } from "../handlers/main";
export default async function parseRoute(fastify: FastifyInstance) {
fastify.get("/start", async (_, reply) => {
- return reply.view("/templates/start.ejs");
+ return reply.view("/templates/start.ejs", { engineList });
});
}
diff --git a/templates/start.ejs b/templates/start.ejs
index cfe0ee9..8fd9310 100644
--- a/templates/start.ejs
+++ b/templates/start.ejs
@@ -17,7 +17,12 @@