diff --git a/src/modules/authorization/authorization.module.ts b/src/modules/authorization/authorization.module.ts new file mode 100644 index 0000000..91eb2d1 --- /dev/null +++ b/src/modules/authorization/authorization.module.ts @@ -0,0 +1,9 @@ +import { Module } from '@nestjs/common'; +import { CqrsModule } from '@nestjs/cqrs'; +import { DatabaseModule } from '../database/database.module'; + +@Module({ + imports: [DatabaseModule, CqrsModule], + exports: [], +}) +export class AuthorizationModule {} diff --git a/src/modules/authorization/domain/usecases/validate-authorization.usecase.ts b/src/modules/authorization/domain/usecases/validate-authorization.usecase.ts index 237f25a..9857da6 100644 --- a/src/modules/authorization/domain/usecases/validate-authorization.usecase.ts +++ b/src/modules/authorization/domain/usecases/validate-authorization.usecase.ts @@ -4,6 +4,6 @@ import { ValidateAuthorizationQuery } from '../../queries/validate-authorization @QueryHandler(ValidateAuthorizationQuery) export class ValidateAuthenticationUseCase { async execute(validate: ValidateAuthorizationQuery): Promise { - return Promise.resolve(true); + return Promise.resolve(validate.action == 'authorized'); } }