public function handle(DeleteAttachmentCommand $command) { $attachment = $this->attachmentService->getOneById($command->getAttachmentId()); $this->attachmentService->delete($attachment); }
public function handle(MarkAttachmentUnlockedCommand $command) { $attachment = $this->attachmentService->getOneById($command->getAttachmentId()); $attachment->setUnlocked(); $this->attachmentService->update($attachment); }