19 lines
547 B
JavaScript
19 lines
547 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.DeleteUserCommandHandler = void 0;
|
|
class DeleteUserCommandHandler {
|
|
constructor(userRepo) {
|
|
this.userRepo = userRepo;
|
|
}
|
|
async execute(cmd) {
|
|
if (cmd.soft) {
|
|
await this.userRepo.softDelete(cmd.id);
|
|
}
|
|
else {
|
|
await this.userRepo.delete(cmd.id);
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
exports.DeleteUserCommandHandler = DeleteUserCommandHandler;
|
|
//# sourceMappingURL=DeleteUserCommandHandler.js.map
|