|
|
@@ -1,7 +1,7 @@
|
|
|
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
|
import { createCrudRoutes } from '@d8d/shared-crud';
|
|
|
import { UserEntityMt } from '../entities/user.entity.mt';
|
|
|
-import { UserSchemaMt, CreateUserDtoMt, UpdateUserDtoMt } from '../schemas/user.schema.mt';
|
|
|
+import { CreateUserDtoMt, UpdateUserDtoMt, UserResponseSchemaMt } from '../schemas/user.schema.mt';
|
|
|
import customRoutesMt from './custom.routes.mt';
|
|
|
import { authMiddleware } from '@d8d/core-module-mt/auth-module-mt';
|
|
|
|
|
|
@@ -10,8 +10,8 @@ const userCrudRoutesMt = createCrudRoutes({
|
|
|
entity: UserEntityMt,
|
|
|
createSchema: CreateUserDtoMt,
|
|
|
updateSchema: UpdateUserDtoMt,
|
|
|
- getSchema: UserSchemaMt,
|
|
|
- listSchema: UserSchemaMt,
|
|
|
+ getSchema: UserResponseSchemaMt,
|
|
|
+ listSchema: UserResponseSchemaMt,
|
|
|
searchFields: ['username', 'nickname', 'phone', 'email'],
|
|
|
relations: ['roles', 'avatarFile'],
|
|
|
middleware: [authMiddleware],
|