Skip to content

Commit 27d66f3

Browse files
committed
feat: Add nodeId support in FileService.getNodeFromData
Enable FileService to retrieve nodes using Nextcloud nodeId in addition to LibreSign fileId. This allows the service to handle both registered LibreSign files and new Nextcloud files in the same workflow. The method now checks for 'nodeId' after 'fileId' and 'path', maintaining backward compatibility while adding new functionality. Signed-off-by: Vitor Mattos <[email protected]>
1 parent 99135d6 commit 27d66f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/Service/FileService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ public function getNodeFromData(array $data): Node {
115115
if (isset($data['file']['path'])) {
116116
return $this->folderService->getFileByPath($data['file']['path']);
117117
}
118+
if (isset($data['file']['nodeId'])) {
119+
return $this->folderService->getFileByNodeId($data['file']['nodeId']);
120+
}
118121

119122
$content = $this->getFileRaw($data);
120123
$extension = $this->getExtension($content);

0 commit comments

Comments
 (0)