export class DeleteUserCommandHandler { constructor(userRepository) { this.userRepository = userRepository; } async handle(command) { const result = await this.userRepository.delete(command.id); if (!result) { throw new Error('User not found'); } return result; } }