Files
SerpentRace/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js
T

19 lines
582 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeleteOrganizationCommandHandler = void 0;
class DeleteOrganizationCommandHandler {
constructor(orgRepo) {
this.orgRepo = orgRepo;
}
async execute(cmd) {
if (cmd.soft) {
await this.orgRepo.softDelete(cmd.id);
}
else {
await this.orgRepo.delete(cmd.id);
}
return true;
}
}
exports.DeleteOrganizationCommandHandler = DeleteOrganizationCommandHandler;
//# sourceMappingURL=DeleteOrganizationCommandHandler.js.map