Skip to content

Commit

Permalink
fix module + typos
Browse files Browse the repository at this point in the history
  • Loading branch information
annarhughes committed Jun 13, 2024
1 parent fa76c38 commit a05ff89
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { AuthModule } from './auth/auth.module';
import { CoursePartnerModule } from './course-partner/course-partner.module';
import { CourseUserModule } from './course-user/course-user.module';
import { CourseModule } from './course/course.module';
import { EventLoggerModule } from './event-logger/event-logger.module';
import { FeatureModule } from './feature/feature.module';
import { LoggerModule } from './logger/logger.module';
import { PartnerAccessModule } from './partner-access/partner-access.module';
Expand Down Expand Up @@ -37,6 +38,7 @@ import { WebhooksModule } from './webhooks/webhooks.module';
SubscriptionUserModule,
FeatureModule,
PartnerFeatureModule,
EventLoggerModule,
],
})
export class AppModule {}
2 changes: 1 addition & 1 deletion src/event-logger/event-logger.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class EventLoggerController {
})
@ApiBearerAuth('access-token')
@UseGuards(FirebaseAuthGuard)
async complete(@Req() req: Request, @Body() event: EVENT_NAME) {
async createEventLog(@Req() req: Request, @Body() { event }: { event: EVENT_NAME }) {
const now = new Date();
return await this.eventLoggerService.createEventLog({
userId: req['userEntity'].id,
Expand Down
40 changes: 37 additions & 3 deletions src/event-logger/event-logger.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SlackMessageClient } from 'src/api/slack/slack-api';
import { ZapierWebhookClient } from 'src/api/zapier/zapier-webhook-client';
import { EventLogEntity } from 'src/entities/event-log.entity';
import { PartnerAccessEntity } from 'src/entities/partner-access.entity';
import { PartnerEntity } from 'src/entities/partner.entity';
import { SubscriptionUserEntity } from 'src/entities/subscription-user.entity';
import { SubscriptionEntity } from 'src/entities/subscription.entity';
import { TherapySessionEntity } from 'src/entities/therapy-session.entity';
import { UserEntity } from 'src/entities/user.entity';
import { PartnerAccessService } from 'src/partner-access/partner-access.service';
import { SubscriptionUserService } from 'src/subscription-user/subscription-user.service';
import { SubscriptionService } from 'src/subscription/subscription.service';
import { TherapySessionService } from 'src/therapy-session/therapy-session.service';
import { UserService } from 'src/user/user.service';
import { EventLoggerController } from './event-logger.controller';
import { EventLoggerService } from './event-logger.service';

@Module({
imports: [TypeOrmModule.forFeature([EventLogEntity])],
providers: [EventLoggerService],
imports: [
TypeOrmModule.forFeature([
EventLogEntity,
UserEntity,
PartnerAccessEntity,
PartnerEntity,
SubscriptionUserEntity,
TherapySessionEntity,
SubscriptionEntity,
]),
],
controllers: [EventLoggerController],
providers: [
EventLoggerService,
UserService,
SubscriptionUserService,
TherapySessionService,
PartnerAccessService,
SubscriptionService,
ZapierWebhookClient,
SlackMessageClient,
],
})
export class SessionModule {}
export class EventLoggerModule {}

0 comments on commit a05ff89

Please sign in to comment.