From 75aa0eebba3b72513ee6ae91ab2e4fb9bfee5709 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 30 Jul 2026 11:13:07 +0200 Subject: [PATCH] fix: expose the documented endpoint for cloning a board Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- appinfo/routes.php | 1 + lib/Controller/BoardApiController.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 6e2c273087..1a64b7eb84 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 1dd2d3ca90..4953c1b989 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)