Skip to content

Commit b142dcf

Browse files
Merge pull request #8220 from nextcloud/fix/board-clone-api-route
fix: expose the documented endpoint for cloning a board
2 parents 136609b + 75aa0ee commit b142dcf

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

appinfo/routes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
['name' => 'board_api#addAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl', 'verb' => 'POST'],
8787
['name' => 'board_api#deleteAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'DELETE'],
8888
['name' => 'board_api#updateAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'PUT'],
89+
['name' => 'board_api#clone', 'url' => '/api/v{apiVersion}/boards/{boardId}/clone', 'verb' => 'POST'],
8990

9091
['name' => 'board_import_api#getAllowedSystems', 'url' => '/api/v{apiVersion}/boards/import/getSystems','verb' => 'GET'],
9192
['name' => 'board_import_api#getConfigSchema', 'url' => '/api/v{apiVersion}/boards/import/config/schema/{name}','verb' => 'GET'],

lib/Controller/BoardApiController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public function deleteAcl($aclId) {
147147
return new DataResponse($acl, HTTP::STATUS_OK);
148148
}
149149

150-
/**
151-
* @NoAdminRequired
152-
*/
150+
#[NoAdminRequired]
151+
#[NoCSRFRequired]
152+
#[CORS]
153153
public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse {
154154
return new DataResponse(
155155
$this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)

0 commit comments

Comments
 (0)