|
|
@@ -1,13 +1,13 @@
|
|
|
import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
|
|
|
import { z } from '@hono/zod-openapi';
|
|
|
-import { GoodsSchema } from '@/server/modules/goods/goods.schema';
|
|
|
-import { ErrorSchema } from '@/server/utils/errorHandler';
|
|
|
+import { GoodsSchema } from '../../modules/goods/goods.schema';
|
|
|
+import { ErrorSchema } from '../../utils/errorHandler';
|
|
|
import { AppDataSource } from '@/server/data-source';
|
|
|
-import { Goods } from '@/server/modules/goods/goods.entity';
|
|
|
+import { Goods } from '../../modules/goods/goods.entity';
|
|
|
import { AuthContext } from '@/server/types/context';
|
|
|
-import { authMiddleware } from '@/server/middleware/auth.middleware';
|
|
|
-import { RandomGoodsQuerySchema, RandomGoodsResponseSchema } from '@/server/modules/goods/schemas/random.schema';
|
|
|
-import { parseWithAwait } from '@/server/utils/parseWithAwait';
|
|
|
+import { authMiddleware } from '../../middleware/auth.middleware';
|
|
|
+import { RandomGoodsQuerySchema, RandomGoodsResponseSchema } from '../../modules/goods/schemas/random.schema';
|
|
|
+import { parseWithAwait } from '../../utils/parseWithAwait';
|
|
|
|
|
|
// 定义随机商品列表路由
|
|
|
const routeDef = createRoute({
|