Initial commit
This commit is contained in:
22
packages/navigation/src/integrations/api/router.ts
Normal file
22
packages/navigation/src/integrations/api/router.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { router } from "@repo/core-shared/trpc/init";
|
||||
|
||||
import { navigationContainer } from "../../di/container";
|
||||
import { NAVIGATION_SYMBOLS } from "../../di/symbols";
|
||||
|
||||
import { getHeaderInputSchema } from "../../application/use-cases/get-header.use-case";
|
||||
import type { IGetHeaderController } from "../../interface-adapters/controllers/get-header.controller";
|
||||
|
||||
import { navigationProcedure } from "./procedures";
|
||||
|
||||
export const navigationRouter = router({
|
||||
header: navigationProcedure
|
||||
.input(getHeaderInputSchema)
|
||||
.query(({ input }) => {
|
||||
const ctrl = navigationContainer.get<IGetHeaderController>(
|
||||
NAVIGATION_SYMBOLS.IGetHeaderController,
|
||||
);
|
||||
return ctrl(input);
|
||||
}),
|
||||
});
|
||||
|
||||
export type NavigationRouter = typeof navigationRouter;
|
||||
Reference in New Issue
Block a user