mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 05:09:26 +00:00
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { Module } from '@nestjs/common'
|
|
import { AuthService } from './auth.service'
|
|
import { AuthController } from './auth.controller'
|
|
import { UsersModule } from '../users/users.module'
|
|
import { LocalStrategy } from './strategies/local.strategy'
|
|
import { CqrsModule } from '@nestjs/cqrs'
|
|
import {
|
|
CreateUserHandler,
|
|
GetCurrentUserDataHandler,
|
|
LogoutHandler,
|
|
RefreshTokenHandler,
|
|
ResendVerificationEmailHandler,
|
|
ResetPasswordHandler,
|
|
SendPasswordRecoveryEmailHandler,
|
|
VerifyEmailHandler,
|
|
} from './use-cases'
|
|
import { AuthRepository } from './infrastructure/auth.repository'
|
|
|
|
const commandHandlers = [
|
|
CreateUserHandler,
|
|
GetCurrentUserDataHandler,
|
|
LogoutHandler,
|
|
RefreshTokenHandler,
|
|
ResendVerificationEmailHandler,
|
|
ResetPasswordHandler,
|
|
SendPasswordRecoveryEmailHandler,
|
|
VerifyEmailHandler,
|
|
]
|
|
|
|
@Module({
|
|
imports: [UsersModule, CqrsModule],
|
|
controllers: [AuthController],
|
|
providers: [AuthService, LocalStrategy, AuthRepository, ...commandHandlers],
|
|
exports: [AuthService, CqrsModule],
|
|
})
|
|
export class AuthModule {}
|