diff --git a/appinfo/routes.php b/appinfo/routes.php index 6e2c27308..1a64b7eb8 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -86,6 +86,7 @@ ['name' => 'board_api#addAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl', 'verb' => 'POST'], ['name' => 'board_api#deleteAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'DELETE'], ['name' => 'board_api#updateAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'PUT'], + ['name' => 'board_api#clone', 'url' => '/api/v{apiVersion}/boards/{boardId}/clone', 'verb' => 'POST'], ['name' => 'board_import_api#getAllowedSystems', 'url' => '/api/v{apiVersion}/boards/import/getSystems','verb' => 'GET'], ['name' => 'board_import_api#getConfigSchema', 'url' => '/api/v{apiVersion}/boards/import/config/schema/{name}','verb' => 'GET'], diff --git a/lib/Controller/BoardApiController.php b/lib/Controller/BoardApiController.php index 1dd2d3ca9..4953c1b98 100644 --- a/lib/Controller/BoardApiController.php +++ b/lib/Controller/BoardApiController.php @@ -147,9 +147,9 @@ public function deleteAcl($aclId) { return new DataResponse($acl, HTTP::STATUS_OK); } - /** - * @NoAdminRequired - */ + #[NoAdminRequired] + #[NoCSRFRequired] + #[CORS] public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse { return new DataResponse( $this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)