12 lines
373 B
TypeScript
12 lines
373 B
TypeScript
import { IUserRepository } from '../../../Domain/IRepository/IUserRepository';
|
|
import { ActivateUserCommand } from './ActivateUserCommand';
|
|
|
|
|
|
export class ActivateUserCommandHandler {
|
|
constructor(private readonly userRepo: IUserRepository) {}
|
|
|
|
async execute(cmd: ActivateUserCommand): Promise<boolean> {
|
|
await this.userRepo.activate(cmd.id);
|
|
return true;
|
|
}
|
|
} |