import { CommandHandler } from '@nestjs/cqrs'; import { UsersRepository } from '../../adapters/secondaries/users.repository'; import { DeleteUserCommand } from '../../commands/delete-user.command'; @CommandHandler(DeleteUserCommand) export class DeleteUserUseCase { constructor(private readonly _repository: UsersRepository) {} async execute(command: DeleteUserCommand): Promise { return this._repository.delete(command.uuid); } }