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

Commit

Permalink
♻️ Add membership module to app
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 3, 2020
1 parent aa80db1 commit a39009b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions http/group/create-group.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@baseUrl = http://localhost:3000
@userId = 1

POST {{baseUrl}}/users/{{userId}}/memberships
content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyMSIsInNjb3BlcyI6WyJ1c2VyLTE6KiJdLCJpYXQiOjE2MDQ0MDY1NjksImV4cCI6MTYwNDQxMDE2OX0.AMBGQtM4pfdyJSopI9jnV_5bZbHTkgwuOrC1ttyYvwk

{
"name": "Koj"
}
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { EmailModule } from './modules/email/email.module';
import { EmailsModule } from './modules/emails/emails.module';
import { GeolocationModule } from './modules/geolocation/geolocation.module';
import { GroupsModule } from './modules/groups/groups.module';
import { MembershipsModule } from './modules/memberships/memberships.module';
import { MultiFactorAuthenticationModule } from './modules/multi-factor-authentication/multi-factor-authentication.module';
import { PrismaModule } from './modules/prisma/prisma.module';
import { SessionsModule } from './modules/sessions/sessions.module';
Expand Down Expand Up @@ -55,6 +56,7 @@ import { UsersModule } from './modules/users/users.module';
DomainsModule,
DnsModule,
GeolocationModule,
MembershipsModule,
StripeModule,
],
providers: [
Expand Down
3 changes: 2 additions & 1 deletion src/modules/memberships/memberships.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { AuthModule } from '../auth/auth.module';
import { EmailModule } from '../email/email.module';
import { PrismaModule } from '../prisma/prisma.module';
import { GroupMembershipController } from './memberships-group.controller';
import { UserMembershipController } from './memberships-user.controller';
import { MembershipsService } from './memberships.service';

@Module({
imports: [PrismaModule, EmailModule, ConfigModule],
imports: [PrismaModule, EmailModule, ConfigModule, AuthModule],
controllers: [UserMembershipController, GroupMembershipController],
providers: [MembershipsService],
})
Expand Down

0 comments on commit a39009b

Please sign in to comment.