Skip to content

Commit

Permalink
REMOVE ME: temporary fix to allow both routes on same endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Altahrim committed Aug 24, 2023
1 parent d2b9673 commit 319d27e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Controller/V1/MetaDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ public function setMetaData(int $id, string $metaData): DataResponse {
public function updateMetaData(int $id, string $metaData): DataResponse {
$e2eToken = $this->request->getParam('e2e-token');

// FIXME Temporary fix to handle both routes on single endpoint
if (empty($e2eToken)) {
$e2eToken = $this->request->getHeader('e2e-token');
}
// End

if ($this->lockManager->isLocked($id, $e2eToken)) {
throw new OCSForbiddenException($this->l10n->t('You are not allowed to edit the file, make sure to first lock it, and then send the right token'));
}
Expand Down

0 comments on commit 319d27e

Please sign in to comment.