start authorization module
This commit is contained in:
parent
c832d69c2e
commit
edcad16e3f
|
@ -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 {}
|
|
@ -4,6 +4,6 @@ import { ValidateAuthorizationQuery } from '../../queries/validate-authorization
|
||||||
@QueryHandler(ValidateAuthorizationQuery)
|
@QueryHandler(ValidateAuthorizationQuery)
|
||||||
export class ValidateAuthenticationUseCase {
|
export class ValidateAuthenticationUseCase {
|
||||||
async execute(validate: ValidateAuthorizationQuery): Promise<boolean> {
|
async execute(validate: ValidateAuthorizationQuery): Promise<boolean> {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(validate.action == 'authorized');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue