start authorization module

This commit is contained in:
Gsk54 2023-01-16 17:07:53 +01:00
parent c832d69c2e
commit edcad16e3f
2 changed files with 10 additions and 1 deletions

View File

@ -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 {}

View File

@ -4,6 +4,6 @@ import { ValidateAuthorizationQuery } from '../../queries/validate-authorization
@QueryHandler(ValidateAuthorizationQuery)
export class ValidateAuthenticationUseCase {
async execute(validate: ValidateAuthorizationQuery): Promise<boolean> {
return Promise.resolve(true);
return Promise.resolve(validate.action == 'authorized');
}
}