forked from humanprotocol/human-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from blockydevs/unit_tests_fix
fix: unit tests
- Loading branch information
Showing
3 changed files
with
44 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
packages/apps/human-app/server/src/modules/user-operator/operator.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; | ||
import { OperatorService } from './operator.service'; | ||
import { ReputationOracleModule } from '../../integrations/reputation-oracle/reputation-oracle.module'; | ||
import { OperatorProfile } from './operator.mapper'; | ||
import { TokenMiddleware } from '../../common/interceptors/auth-token.middleware'; | ||
import { OperatorController } from './operator.controller'; | ||
|
||
@Module({ | ||
imports: [ReputationOracleModule], | ||
providers: [OperatorService, OperatorProfile], | ||
exports: [OperatorService], | ||
}) | ||
export class OperatorModule {} | ||
export class OperatorModule implements NestModule { | ||
configure(consumer: MiddlewareConsumer) { | ||
consumer.apply(TokenMiddleware).forRoutes(OperatorController); | ||
} | ||
} |
10 changes: 8 additions & 2 deletions
10
packages/apps/human-app/server/src/modules/user-worker/worker.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; | ||
import { WorkerService } from './worker.service'; | ||
import { ReputationOracleModule } from '../../integrations/reputation-oracle/reputation-oracle.module'; | ||
import { WorkerProfile } from './worker.mapper'; | ||
import { TokenMiddleware } from '../../common/interceptors/auth-token.middleware'; | ||
import { WorkerController } from './worker.controller'; | ||
|
||
@Module({ | ||
imports: [ReputationOracleModule], | ||
providers: [WorkerService, WorkerProfile], | ||
exports: [WorkerService], | ||
}) | ||
export class WorkerModule {} | ||
export class WorkerModule implements NestModule { | ||
configure(consumer: MiddlewareConsumer) { | ||
consumer.apply(TokenMiddleware).forRoutes(WorkerController); | ||
} | ||
} |