Skip to content

Commit d3b121f

Browse files
committed
Use @shared alias
1 parent 1144b8e commit d3b121f

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/index.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1+
import {
2+
createApiRoutes,
3+
createAuthenticatedApiRoutes,
4+
} from "@shared/apiRoutes.ts";
15
import { createAppConfig } from "@shared/appConfig.ts";
26
import { createAppConfigMiddleware } from "@shared/appConfigMiddleware.ts";
37
import type { AppVariables } from "@shared/appVariables.ts";
48
import { systemClock } from "@shared/clock.ts";
59
import { createClockMiddleware } from "@shared/clockMiddleware.ts";
610
import { createLoggerMiddleware } from "@shared/loggerMiddleware.ts";
11+
import {
12+
createAuthenticatedPageRoutes,
13+
createPageRoutes,
14+
} from "@shared/pageRoutes.ts";
15+
import { pageRoutes } from "@shared/routes";
716
import { createStructuredLogger } from "@shared/structuredLogger.ts";
817
import { addUser } from "@shared/user.ts";
918
import { randomUUIDv7 } from "bun";
19+
import { roundToNearestHours } from "date-fns";
1020
import { type Context, Hono } from "hono";
1121
import { serveStatic } from "hono/bun";
1222
import { cors } from "hono/cors";
1323
import { csrf } from "hono/csrf";
1424
import { jwt } from "hono/jwt";
1525
import { requestId } from "hono/request-id";
1626
import { secureHeaders } from "hono/secure-headers";
17-
import {
18-
createApiRoutes,
19-
createAuthenticatedApiRoutes,
20-
} from "./shared/apiRoutes.ts";
21-
import {
22-
createAuthenticatedPageRoutes,
23-
createPageRoutes,
24-
} from "./shared/pageRoutes.ts";
2527

2628
// temporary user
2729
// will be removed when IDP is hooked up
@@ -60,7 +62,7 @@ const app = new Hono<{ Variables: AppVariables }>()
6062
.route("/api", createAuthenticatedApiRoutes(jwtMiddleware))
6163
// Page routes
6264
.get("/", (c) => {
63-
return c.redirect("/auth/home");
65+
return c.redirect(pageRoutes.HOME);
6466
})
6567
.route("/", createPageRoutes())
6668
.route("/", createAuthenticatedPageRoutes(jwtMiddleware));

0 commit comments

Comments
 (0)