Skip to content

Commit

Permalink
fix(remove cors annotation)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 10, 2023
1 parent a9f52e7 commit 3ac6590
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
32 changes: 16 additions & 16 deletions lib/Controller/BookmarkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private function toExternalFolderId(int $internal): int {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getSingleBookmark($id): JSONResponse {
Expand Down Expand Up @@ -269,7 +269,7 @@ public function getSingleBookmark($id): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getBookmarks(
Expand Down Expand Up @@ -409,7 +409,7 @@ function ($bm) {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function newBookmark($url = '', $title = null, $description = null, $tags = null, $folders = [], $target = null): JSONResponse {
Expand Down Expand Up @@ -457,7 +457,7 @@ public function newBookmark($url = '', $title = null, $description = null, $tags
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function editBookmark($id = null, $url = null, $title = null, $description = null, $tags = null, $folders = null, $target = null): JSONResponse {
Expand Down Expand Up @@ -503,7 +503,7 @@ public function editBookmark($id = null, $url = null, $title = null, $descriptio
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function deleteBookmark($id): JSONResponse {
Expand Down Expand Up @@ -535,7 +535,7 @@ public function deleteBookmark($id): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function clickBookmark($url = ''): JSONResponse {
Expand Down Expand Up @@ -573,7 +573,7 @@ public function clickBookmark($url = ''): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @return DataDisplayResponse|NotFoundResponse|RedirectResponse|DataResponse
*/
Expand All @@ -598,7 +598,7 @@ public function getBookmarkImage($id) {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @return DataDisplayResponse|NotFoundResponse|RedirectResponse|DataResponse
*/
Expand Down Expand Up @@ -650,7 +650,7 @@ public function doImageResponse(?IImage $image) {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function importBookmark($folder = null): JSONResponse {
Expand Down Expand Up @@ -710,7 +710,7 @@ public function importBookmark($folder = null): JSONResponse {
* @return ExportResponse|JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function exportBookmark() {
Expand All @@ -735,7 +735,7 @@ public function exportBookmark() {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function countBookmarks(int $folder): JSONResponse {
Expand All @@ -757,7 +757,7 @@ public function countBookmarks(int $folder): JSONResponse {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function countUnavailable(): JSONResponse {
Expand All @@ -773,7 +773,7 @@ public function countUnavailable(): JSONResponse {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function countArchived(): JSONResponse {
Expand All @@ -789,7 +789,7 @@ public function countArchived(): JSONResponse {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function countDuplicated(): JSONResponse {
Expand All @@ -805,7 +805,7 @@ public function countDuplicated(): JSONResponse {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function acquireLock(): JSONResponse {
Expand All @@ -830,7 +830,7 @@ public function acquireLock(): JSONResponse {
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function releaseLock(): JSONResponse {
Expand Down
42 changes: 21 additions & 21 deletions lib/Controller/FoldersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private function _returnFolderAsArray($folder): array {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function addFolder($title = '', $parent_folder = -1): JSONResponse {
Expand All @@ -193,7 +193,7 @@ public function addFolder($title = '', $parent_folder = -1): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getFolder($folderId): JSONResponse {
Expand All @@ -218,7 +218,7 @@ public function getFolder($folderId): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function addToFolder($folderId, $bookmarkId): JSONResponse {
Expand All @@ -243,7 +243,7 @@ public function addToFolder($folderId, $bookmarkId): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function removeFromFolder($folderId, $bookmarkId): JSONResponse {
Expand Down Expand Up @@ -272,7 +272,7 @@ public function removeFromFolder($folderId, $bookmarkId): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function deleteFolder($folderId): JSONResponse {
Expand Down Expand Up @@ -304,7 +304,7 @@ public function deleteFolder($folderId): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PupblicPage
*/
public function editFolder($folderId, $title = null, $parent_folder = null): JSONResponse {
Expand Down Expand Up @@ -335,7 +335,7 @@ public function editFolder($folderId, $title = null, $parent_folder = null): JSO
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function hashFolder($folderId, $fields = ['title', 'url']): JSONResponse {
Expand Down Expand Up @@ -367,7 +367,7 @@ public function hashFolder($folderId, $fields = ['title', 'url']): JSONResponse
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getFolderChildren($folderId, $layers = 0): JSONResponse {
Expand All @@ -389,7 +389,7 @@ public function getFolderChildren($folderId, $layers = 0): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getFolderChildrenOrder($folderId, $layers = 0): JSONResponse {
Expand All @@ -411,7 +411,7 @@ public function getFolderChildrenOrder($folderId, $layers = 0): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function setFolderChildrenOrder($folderId, $data = []): JSONResponse {
Expand All @@ -433,7 +433,7 @@ public function setFolderChildrenOrder($folderId, $data = []): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @return JSONResponse
*/
Expand All @@ -459,7 +459,7 @@ public function getFolders($root = -1, $layers = -1): JSONResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getFolderPublicToken($folderId): DataResponse {
Expand All @@ -481,7 +481,7 @@ public function getFolderPublicToken($folderId): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function createFolderPublicToken($folderId): DataResponse {
Expand All @@ -503,7 +503,7 @@ public function createFolderPublicToken($folderId): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function deleteFolderPublicToken($folderId): DataResponse {
Expand All @@ -525,7 +525,7 @@ public function deleteFolderPublicToken($folderId): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function getShare($shareId): DataResponse {
Expand All @@ -546,7 +546,7 @@ public function getShare($shareId): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @throws UnauthenticatedError
*/
Expand All @@ -568,7 +568,7 @@ public function findSharedFolders(): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @throws UnauthenticatedError
*/
Expand All @@ -589,7 +589,7 @@ public function findShares(): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @throws UnauthenticatedError
*/
Expand Down Expand Up @@ -631,7 +631,7 @@ public function getShares($folderId): DataResponse {
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function createShare($folderId, $participant, int $type, $canWrite = false, $canShare = false): DataResponse {
Expand Down Expand Up @@ -659,7 +659,7 @@ public function createShare($folderId, $participant, int $type, $canWrite = fals
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function editShare($shareId, $canWrite = false, $canShare = false): Http\DataResponse {
Expand Down Expand Up @@ -688,7 +688,7 @@ public function editShare($shareId, $canWrite = false, $canShare = false): Http\
* @return Http\DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
*/
public function deleteShare($shareId): DataResponse {
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/InternalFoldersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function getShares($folderId): DataResponse {
* @return DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @throws UnauthenticatedError
*/
Expand All @@ -181,7 +181,7 @@ public function findSharedFolders(): DataResponse {
* @return DataResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
* @PublicPage
* @throws UnauthenticatedError
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/TagsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct($appName, $request, $userId, DB\TagMapper $tagMapper
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
*/
public function deleteTag($old_name = ""): JSONResponse {
if ($old_name === "") {
Expand All @@ -51,7 +51,7 @@ public function deleteTag($old_name = ""): JSONResponse {
*
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
*/
public function renameTag($old_name = "", $new_name = "", $name = ''): JSONResponse {
if ($new_name === '') {
Expand All @@ -71,7 +71,7 @@ public function renameTag($old_name = "", $new_name = "", $name = ''): JSONRespo
* @return JSONResponse
* @NoAdminRequired
* @NoCSRFRequired
* @CORS
*
*/
public function fullTags($count = false): JSONResponse {
header("Cache-Control: no-cache, must-revalidate");
Expand Down

0 comments on commit 3ac6590

Please sign in to comment.