Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Add Stripe controllers to module
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 18, 2020
1 parent a8011fc commit 76181f1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/stripe/stripe-invoices.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Scopes } from '../auth/scope.decorator';
import { StripeService } from './stripe.service';

@Controller('groups/:groupId/invoices')
export class StripeBillingController {
export class StripeInvoicesController {
constructor(private stripeService: StripeService) {}

@Get()
Expand Down
2 changes: 1 addition & 1 deletion src/modules/stripe/stripe-sources.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Scopes } from '../auth/scope.decorator';
import { StripeService } from './stripe.service';

@Controller('groups/:groupId/sources')
export class StripeBillingController {
export class StripeSourcesController {
constructor(private stripeService: StripeService) {}

@Post()
Expand Down
2 changes: 1 addition & 1 deletion src/modules/stripe/stripe-subscription.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Scopes } from '../auth/scope.decorator';
import { StripeService } from './stripe.service';

@Controller('groups/:groupId/subscriptions')
export class StripeBillingController {
export class StripeSubscriptionController {
constructor(private stripeService: StripeService) {}

@Post(':plan')
Expand Down
12 changes: 11 additions & 1 deletion src/modules/stripe/stripe.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { PrismaModule } from '../../providers/prisma/prisma.module';
import { StripeBillingController } from './stripe-billing.controller';
import { StripeWebhookController } from './stripe-webhook.controller';
import { StripeSubscriptionController } from './stripe-subscription.controller';
import { StripeSourcesController } from './stripe-sources.controller';
import { StripeInvoicesController } from './stripe-invoices.controller';
import { StripeService } from './stripe.service';

@Module({
imports: [ConfigModule, PrismaModule],
providers: [StripeService],
exports: [StripeService],
controllers: [StripeBillingController],
controllers: [
StripeBillingController,
StripeInvoicesController,
StripeSourcesController,
StripeSubscriptionController,
StripeWebhookController,
],
})
export class StripeModule {}

0 comments on commit 76181f1

Please sign in to comment.