Skip to content

Commit

Permalink
Merge pull request #186 from zhumeisongsong/feature/rename-AwsCognito…
Browse files Browse the repository at this point in the history
…Service

refactor: ♻️ AwsCognitoService to AwsCognitoAdapter
  • Loading branch information
zhumeisongsong authored Feb 2, 2025
2 parents dbcb402 + 2e668fc commit ef6a8f3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions libs/auth/interface-adapters/src/lib/auth.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { SignInUseCase } from '@auth/application';
import { AUTH_SERVICE } from '@auth/domain';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { AwsCognitoService } from '@shared/infrastructure-aws-cognito';
import { AwsCognitoAdapter } from '@shared/infrastructure-aws-cognito';

import { AuthResolver } from './resolver/auth.resolver';

@Module({
providers: [AuthResolver, SignInUseCase, AwsCognitoService],
providers: [
AuthResolver,
SignInUseCase,
{
provide: AUTH_SERVICE,
useClass: AwsCognitoAdapter,
},
],
imports: [
JwtModule.registerAsync({
imports: [ConfigModule],
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/infrastructure/aws-cognito/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './lib/aws-cognito.service';
export * from './lib/aws-cognito.adapter';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe('AwsCognitoService', () => {
describe('AwsCognitoAdapter', () => {
it('should be defined', () => {
expect(true).toBe(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ConfigService } from '@nestjs/config';
import * as AWS from 'aws-sdk';

@Injectable()
export class AwsCognitoService {
export class AwsCognitoAdapter {
// private readonly configService: ConfigService;
private cognito: AWS.CognitoIdentityServiceProvider;

Expand Down

0 comments on commit ef6a8f3

Please sign in to comment.