Skip to content

Commit 3da13bb

Browse files
committed
wip: use base64 encoding
Signed-off-by: Max <[email protected]>
1 parent 8a3fefb commit 3da13bb

File tree

6 files changed

+792
-37
lines changed

6 files changed

+792
-37
lines changed

lib/Service/DocumentService.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,6 @@ public function addStep($documentId, $sessionId, $steps, $version): array {
192192
if (!is_array($steps) || $stepsJson === null) {
193193
throw new InvalidArgumentException('Failed to encode steps');
194194
}
195-
$validStepTypes = ['addMark', 'attr', 'removeMark', 'replace', 'replaceAround'];
196-
foreach ($steps as $step) {
197-
if (array_key_exists('stepType', $step) && !in_array($step['stepType'], $validStepTypes, true)) {
198-
throw new InvalidArgumentException('Invalid step data');
199-
}
200-
}
201195
$stepsVersion = $this->stepMapper->getLatestVersion($document->getId());
202196
$newVersion = $stepsVersion + count($steps);
203197
$this->cache->set('document-version-' . $document->getId(), $newVersion);

0 commit comments

Comments
 (0)