From f7feeaeb03e4a68329fe087741af45e563e16d6d Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Sun, 3 Aug 2025 17:31:48 +0000 Subject: [PATCH] Replace Share. references with this. in static method - Update Share.scope() calls to use this.scope() in findWithParent static method - Improves consistency and follows TypeScript static method best practices --- server/models/Share.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/models/Share.ts b/server/models/Share.ts index 6833dc555d..3f242c1001 100644 --- a/server/models/Share.ts +++ b/server/models/Share.ts @@ -176,7 +176,7 @@ class Share extends IdModel< where.documentId = documentId; } - const share = await Share.scope({ + const share = await this.scope({ method: ["withCollectionPermissions", user.id], }).findOne({ where }); @@ -209,7 +209,7 @@ class Share extends IdModel< rejectOnEmpty: true, }); - const collectionShare = await Share.scope({ + const collectionShare = await this.scope({ method: ["withCollectionPermissions", user.id], }).findOne({ where: { @@ -229,7 +229,7 @@ class Share extends IdModel< const parentDocIds = docCollection.getDocumentParents(documentId); const allParentShares = parentDocIds - ? await Share.scope({ + ? await this.scope({ method: ["withCollectionPermissions", user.id], }).findAll({ where: {