Skip to content

Commit

Permalink
feat: add webhook controller
Browse files Browse the repository at this point in the history
  • Loading branch information
StashBank committed Apr 3, 2024
1 parent 7da7cb9 commit e56dc7f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion libs/stripe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valor/nestjs-stripe",
"version": "0.0.21",
"version": "0.0.22",
"type": "commonjs",
"private": false,
"author": "opavlovskyi-valor-software",
Expand Down
60 changes: 30 additions & 30 deletions libs/stripe/src/lib/stripe.module.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
import { CanActivate, DynamicModule, Module, ModuleMetadata, Provider, Type, } from '@nestjs/common';
import { STRIPE_AUTH_GUARD } from './stripe-auth.guard';
import { StripeConfig, STRIPE_CONFIG } from './stripe.config';
import { StripeController } from './stripe.controller';
// import { StripeController } from './stripe.controller';
import { StripeLogger } from './stripe.logger';
import { StripeService } from './stripe.service';
import { WebhookController } from './webhook/webhook.controller';
import { WebhookService } from './webhook/webhook.service';
import {
CheckoutSessionController,
CustomerController,
PaymentIntentController,
PaymentMethodController,
PriceController,
ProductController,
SubscriptionController,
InvoiceController,
UsageRecordController,
QuotesController,
SubscriptionScheduleController,
} from './controllers';
import { TestClocksController } from './controllers/test-clock.controller';
// import {
// CheckoutSessionController,
// CustomerController,
// PaymentIntentController,
// PaymentMethodController,
// PriceController,
// ProductController,
// SubscriptionController,
// InvoiceController,
// UsageRecordController,
// QuotesController,
// SubscriptionScheduleController,
// } from './controllers';
// import { TestClocksController } from './controllers/test-clock.controller';

const controllerList = [
PaymentIntentController,
CheckoutSessionController,
CustomerController,
PaymentMethodController,
PriceController,
ProductController,
SubscriptionController,
SubscriptionScheduleController,
InvoiceController,
UsageRecordController,
QuotesController,
TestClocksController,
// PaymentIntentController,
// CheckoutSessionController,
// CustomerController,
// PaymentMethodController,
// PriceController,
// ProductController,
// SubscriptionController,
// SubscriptionScheduleController,
// InvoiceController,
// UsageRecordController,
// QuotesController,
// TestClocksController,

StripeController,
// StripeController,
WebhookController
];
const providerList = [StripeService, StripeLogger, WebhookService];
Expand All @@ -60,15 +60,15 @@ export interface StripeConfigAsyncOptions
}

@Module({
// controllers: controllerList,
controllers: controllerList,
providers: providerList,
exports: exportList,
})
export class StripeModule {
static forRoot(config: StripeConfig, authGuard: Type<CanActivate>): DynamicModule {
return {
module: StripeModule,
// controllers: controllerList,
controllers: controllerList,
providers: [
{
provide: STRIPE_CONFIG,
Expand Down

0 comments on commit e56dc7f

Please sign in to comment.