|
|
@@ -1,6 +1,7 @@
|
|
|
import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
|
|
|
import { z } from 'zod';
|
|
|
import { AppDataSource } from '@d8d/shared-utils';
|
|
|
+import { authMiddleware } from '@d8d/auth-module';
|
|
|
import { PaymentService } from '../../services/payment.service.js';
|
|
|
import { PaymentCreateRequestSchema, PaymentCreateResponseSchema } from '../../schemas/payment.schema.js';
|
|
|
|
|
|
@@ -36,6 +37,7 @@ const createPaymentRoute = createRoute({
|
|
|
});
|
|
|
|
|
|
const app = new OpenAPIHono()
|
|
|
+ .use(authMiddleware)
|
|
|
.openapi(createPaymentRoute, async (c) => {
|
|
|
try {
|
|
|
const paymentData = c.req.valid('json');
|