From ee8e17d80eb2f214fbb448c216be501adfcd01c1 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sat, 8 Nov 2025 19:00:46 +0100 Subject: [PATCH] Index Registers --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 8ea9848..6e8a3ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import Fastify from "fastify"; import swaggerPlugin from "./plugins/swagger" import supabasePlugin from "./plugins/supabase"; +import dayjsPlugin from "./plugins/dayjs"; import healthRoutes from "./routes/health"; import meRoutes from "./routes/auth/me"; import tenantRoutes from "./routes/tenant"; @@ -25,6 +26,8 @@ import authProfilesRoutes from "./routes/profiles"; import helpdeskRoutes from "./routes/helpdesk"; import helpdeskInboundRoutes from "./routes/helpdesk.inbound"; import notificationsRoutes from "./routes/notifications"; +import staffTimeRoutes from "./routes/staff/time"; +import staffTimeConnectRoutes from "./routes/staff/timeconnects"; //M2M import authM2m from "./plugins/auth.m2m"; @@ -51,8 +54,10 @@ async function main() { await app.register(corsPlugin); await app.register(supabasePlugin); await app.register(tenantPlugin); + await app.register(dayjsPlugin); app.addHook('preHandler', (req, reply, done) => { + console.log(req.method) console.log('Matched path:', req.routeOptions.url) done() }) @@ -98,6 +103,8 @@ async function main() { await subApp.register(authProfilesRoutes); await subApp.register(helpdeskRoutes); await subApp.register(notificationsRoutes); + await subApp.register(staffTimeRoutes); + await subApp.register(staffTimeConnectRoutes); },{prefix: "/api"})