Skip to content

Commit

Permalink
fix(cosmetic): remove unnecessary comments
Browse files Browse the repository at this point in the history
Signed-off-by: codewithvk <[email protected]>
  • Loading branch information
codewithvk committed Feb 5, 2025
1 parent 85483d6 commit fdb0200
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public function uploadSettingsFile(string $fileId, string $access_token): JSONRe
$wopi = $this->wopiMapper->getWopiForToken($access_token);

$userId = $wopi->getEditorUid();
// TODO: auth - for admin??

$content = fopen('php://input', 'rb');
if (!$content) {
throw new \Exception('Failed to read input stream.');
Expand Down Expand Up @@ -985,10 +985,11 @@ private function getWopiUrlForTemplate(Wopi $wopi): string {
$nextcloudUrl = $this->appConfig->getNextcloudUrl() ?: trim($this->urlGenerator->getAbsoluteURL(''), '/');
return $nextcloudUrl . '/index.php/apps/richdocuments/wopi/template/' . $wopi->getTemplateId() . '?access_token=' . $wopi->getToken();
}

private function generateSettingToken(string $userId): string {
return $this->settingsService->generateIframeToken('user', $userId)['token'];
}
// todo extract nextcloud url from everything

private function generateSettings(string $userId, string $type): array {
$nextcloudUrl = $this->appConfig->getNextcloudUrl() ?: trim($this->urlGenerator->getAbsoluteURL(''), '/');
$uri = $nextcloudUrl . '/index.php/apps/richdocuments/wopi/settings' . '?type=' . $type . '&access_token=' . $this->generateSettingToken($userId) . '&fileId=' . '-1';
Expand Down
5 changes: 0 additions & 5 deletions lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public function __construct(
$this->cache = $cacheFactory->createDistributed(Application::APPNAME);
}

// TODO: Implement file caching...

/**
* Ensure the settings directory exists, if it doesn't exist then create it.
*
Expand Down Expand Up @@ -322,7 +320,4 @@ public function deleteSettingsFile(string $type, string $category, string $name,
throw $e;
}
}

// TODO: Handle installDefaultSystemFiles setting

}
1 change: 0 additions & 1 deletion src/components/CoolFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<input type="hidden" name="wopi_setting_base_url" :value="wopiSettingBaseUrl">
<input type="hidden" name="iframe_type" :value="iframeType">
<input type="hidden" name="css_variables" :value="cssVariables">
<!-- TODO: Include any other necessary hidden inputs - send css variables -->
</form>
<iframe :id="iframeName"
:name="iframeName"
Expand Down

0 comments on commit fdb0200

Please sign in to comment.