fix(api): add JWT scheme to @ApiBearerAuth and fix Prisma 7 extensions config
- Add 'JWT' scheme name to @ApiBearerAuth() in payments & subscriptions controllers so Swagger UI correctly links to the JWT security definition - Add postgresqlExtensions preview feature to Prisma schema for v7 compat Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -45,7 +45,7 @@ export class PaymentsController {
|
||||
private readonly queryBus: QueryBus,
|
||||
) {}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@ApiBearerAuth('JWT')
|
||||
@ApiOperation({ summary: 'Create a new payment' })
|
||||
@ApiResponse({ status: 201, description: 'Payment created successfully' })
|
||||
@ApiResponse({ status: 400, description: 'Bad request' })
|
||||
@@ -90,7 +90,7 @@ export class PaymentsController {
|
||||
);
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@ApiBearerAuth('JWT')
|
||||
@ApiOperation({ summary: 'Get payment status by ID' })
|
||||
@ApiResponse({ status: 200, description: 'Payment status retrieved' })
|
||||
@ApiResponse({ status: 401, description: 'Unauthorized' })
|
||||
@@ -104,7 +104,7 @@ export class PaymentsController {
|
||||
return this.queryBus.execute(new GetPaymentStatusQuery(id, user.sub));
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@ApiBearerAuth('JWT')
|
||||
@ApiOperation({ summary: 'List transactions for the authenticated user' })
|
||||
@ApiResponse({ status: 200, description: 'Transactions retrieved' })
|
||||
@ApiResponse({ status: 401, description: 'Unauthorized' })
|
||||
@@ -119,7 +119,7 @@ export class PaymentsController {
|
||||
);
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@ApiBearerAuth('JWT')
|
||||
@ApiOperation({ summary: 'Refund a payment (admin only)' })
|
||||
@ApiResponse({ status: 201, description: 'Refund initiated successfully' })
|
||||
@ApiResponse({ status: 401, description: 'Unauthorized' })
|
||||
|
||||
Reference in New Issue
Block a user