Index Registers
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import Fastify from "fastify";
|
import Fastify from "fastify";
|
||||||
import swaggerPlugin from "./plugins/swagger"
|
import swaggerPlugin from "./plugins/swagger"
|
||||||
import supabasePlugin from "./plugins/supabase";
|
import supabasePlugin from "./plugins/supabase";
|
||||||
|
import dayjsPlugin from "./plugins/dayjs";
|
||||||
import healthRoutes from "./routes/health";
|
import healthRoutes from "./routes/health";
|
||||||
import meRoutes from "./routes/auth/me";
|
import meRoutes from "./routes/auth/me";
|
||||||
import tenantRoutes from "./routes/tenant";
|
import tenantRoutes from "./routes/tenant";
|
||||||
@@ -25,6 +26,8 @@ import authProfilesRoutes from "./routes/profiles";
|
|||||||
import helpdeskRoutes from "./routes/helpdesk";
|
import helpdeskRoutes from "./routes/helpdesk";
|
||||||
import helpdeskInboundRoutes from "./routes/helpdesk.inbound";
|
import helpdeskInboundRoutes from "./routes/helpdesk.inbound";
|
||||||
import notificationsRoutes from "./routes/notifications";
|
import notificationsRoutes from "./routes/notifications";
|
||||||
|
import staffTimeRoutes from "./routes/staff/time";
|
||||||
|
import staffTimeConnectRoutes from "./routes/staff/timeconnects";
|
||||||
|
|
||||||
//M2M
|
//M2M
|
||||||
import authM2m from "./plugins/auth.m2m";
|
import authM2m from "./plugins/auth.m2m";
|
||||||
@@ -51,8 +54,10 @@ async function main() {
|
|||||||
await app.register(corsPlugin);
|
await app.register(corsPlugin);
|
||||||
await app.register(supabasePlugin);
|
await app.register(supabasePlugin);
|
||||||
await app.register(tenantPlugin);
|
await app.register(tenantPlugin);
|
||||||
|
await app.register(dayjsPlugin);
|
||||||
|
|
||||||
app.addHook('preHandler', (req, reply, done) => {
|
app.addHook('preHandler', (req, reply, done) => {
|
||||||
|
console.log(req.method)
|
||||||
console.log('Matched path:', req.routeOptions.url)
|
console.log('Matched path:', req.routeOptions.url)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
@@ -98,6 +103,8 @@ async function main() {
|
|||||||
await subApp.register(authProfilesRoutes);
|
await subApp.register(authProfilesRoutes);
|
||||||
await subApp.register(helpdeskRoutes);
|
await subApp.register(helpdeskRoutes);
|
||||||
await subApp.register(notificationsRoutes);
|
await subApp.register(notificationsRoutes);
|
||||||
|
await subApp.register(staffTimeRoutes);
|
||||||
|
await subApp.register(staffTimeConnectRoutes);
|
||||||
|
|
||||||
},{prefix: "/api"})
|
},{prefix: "/api"})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user