Skip to content

Commit 3ae5ece

Browse files
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 4ec7147 commit 3ae5ece

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)