fix: allow sharing empty folders (#1096)

This commit is contained in:
ZacharyZcR
2026-07-28 01:47:38 +08:00
committed by GitHub
parent 7c397e3f8a
commit c12fc19c76
-5
View File
@@ -352,8 +352,6 @@ router.post(
* description: Folder shared successfully.
* 400:
* description: Invalid request body.
* 404:
* description: Folder has no hosts.
* 500:
* description: Failed to share folder.
*/
@@ -415,9 +413,6 @@ router.post(
userId,
folder,
);
if (hostsInFolder.length === 0) {
return res.status(404).json({ error: "Folder has no hosts" });
}
const expiresAt = expiryFromDuration(durationHours);
const rbacAccessRepository = createCurrentRbacAccessRepository();