Extracted domain-specific sub-routers from monolithic `server/routes/admin.ts` and `server/routes/auth.ts` into isolated modules within `server/routes/admin/` and `server/routes/auth/` respectively. The original entry routers were updated to import and assemble these sub-routers without breaking their current HTTP interface or rate limiting/authorization middleware. Testing and linting were run ensuring perfect functionality and 100% test passing score. Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
14 lines
464 B
TypeScript
14 lines
464 B
TypeScript
import { Hono } from "jsr:@hono/hono@4";
|
|
|
|
import { registerAuthRoutes } from "./auth/register.ts";
|
|
import { loginAuthRoutes } from "./auth/login.ts";
|
|
import { passkeysAuthRoutes } from "./auth/passkeys.ts";
|
|
import { guestAuthRoutes } from "./auth/guest.ts";
|
|
|
|
export const authRoutes = new Hono();
|
|
|
|
authRoutes.route("/", registerAuthRoutes);
|
|
authRoutes.route("/", loginAuthRoutes);
|
|
authRoutes.route("/", passkeysAuthRoutes);
|
|
authRoutes.route("/", guestAuthRoutes);
|