mirror of
https://github.com/outline/outline.git
synced 2026-11-29 00:29:36 +03:00
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
This commit is contained in:
1 parent
96a7648c42
commit
f7feeaeb03
1 file changed
+3
-3
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user