0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/core/src/model-routers/index.ts

10 lines
355 B
TypeScript
Raw Normal View History

2022-12-26 07:12:19 -05:00
import { Hooks } from '@logto/schemas/models';
2022-12-22 00:50:49 -05:00
import { createModelRouter } from '@withtyped/postgres';
import type { QueryClient } from '@withtyped/server';
2022-12-22 00:50:49 -05:00
export type ModelRouters = ReturnType<typeof createModelRouters>;
2022-12-22 00:50:49 -05:00
export const createModelRouters = (queryClient: QueryClient) => ({
hook: createModelRouter(Hooks, queryClient).withCrud(),
});