From 51e0bda7be7a8a4a68784d572a5028e2e959e11b Mon Sep 17 00:00:00 2001 From: Sergei Samokhvalov Date: Thu, 16 Nov 2023 21:04:27 +0300 Subject: [PATCH] return includePermissionsInfo --- src/db/models/favorite/index.ts | 2 +- src/db/models/navigation/index.ts | 2 +- src/services/entry/actions/create-in-workbook.ts | 2 +- src/services/entry/actions/get-entry-relations.ts | 2 +- src/services/new/entry/get-entry-by-key.ts | 2 +- src/services/new/entry/get-entry.ts | 2 +- src/services/new/workbook/get-workbook-content.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/db/models/favorite/index.ts b/src/db/models/favorite/index.ts index f3e20b07..4a662611 100644 --- a/src/db/models/favorite/index.ts +++ b/src/db/models/favorite/index.ts @@ -186,7 +186,7 @@ class Favorite extends Model { {ctx}, { workbookIds: workbookEntries.map((entry) => entry.workbookId) as string[], - includePermissionsInfo: true, + includePermissionsInfo, }, ); diff --git a/src/db/models/navigation/index.ts b/src/db/models/navigation/index.ts index c78221f9..6c243d5f 100644 --- a/src/db/models/navigation/index.ts +++ b/src/db/models/navigation/index.ts @@ -249,7 +249,7 @@ class Navigation extends Model { {ctx}, { workbookIds: workbookEntries.map((entry) => entry.workbookId) as string[], - includePermissionsInfo: true, + includePermissionsInfo, }, ); diff --git a/src/services/entry/actions/create-in-workbook.ts b/src/services/entry/actions/create-in-workbook.ts index df3d51b7..6f958b78 100644 --- a/src/services/entry/actions/create-in-workbook.ts +++ b/src/services/entry/actions/create-in-workbook.ts @@ -106,7 +106,7 @@ export async function createEntryInWorkbook( const createdEntry = await transaction(Entry.primary, async (trx) => { const workbook = await getWorkbook( {ctx, trx, skipCheckPermissions: isPrivateRoute}, - {workbookId, includePermissionsInfo: true}, + {workbookId, includePermissionsInfo}, ); if (accessServiceEnabled && !isPrivateRoute) { diff --git a/src/services/entry/actions/get-entry-relations.ts b/src/services/entry/actions/get-entry-relations.ts index 82111374..b6af5e76 100644 --- a/src/services/entry/actions/get-entry-relations.ts +++ b/src/services/entry/actions/get-entry-relations.ts @@ -71,7 +71,7 @@ export async function getEntryRelations(ctx: CTX, params: GetEntryRelationsData) ctx, trx: Entry.replica, }, - {workbookId: entry.workbookId, includePermissionsInfo: true}, + {workbookId: entry.workbookId, includePermissionsInfo}, ); if (includePermissionsInfo) { diff --git a/src/services/new/entry/get-entry-by-key.ts b/src/services/new/entry/get-entry-by-key.ts index 34e11548..2ebb02bc 100644 --- a/src/services/new/entry/get-entry-by-key.ts +++ b/src/services/new/entry/get-entry-by-key.ts @@ -118,7 +118,7 @@ export const getEntryByKey = async ( if (!isPrivateRoute) { const workbook = await getWorkbook( {ctx, trx}, - {workbookId: joinedEntryRevision.workbookId, includePermissionsInfo: true}, + {workbookId: joinedEntryRevision.workbookId, includePermissionsInfo}, ); if (includePermissionsInfo) { diff --git a/src/services/new/entry/get-entry.ts b/src/services/new/entry/get-entry.ts index 1a6a7b8f..54e3e3d5 100644 --- a/src/services/new/entry/get-entry.ts +++ b/src/services/new/entry/get-entry.ts @@ -120,7 +120,7 @@ export const getEntry = async ( {ctx, trx}, { workbookId: joinedEntryRevisionFavorite.workbookId, - includePermissionsInfo: true, + includePermissionsInfo, }, ); diff --git a/src/services/new/workbook/get-workbook-content.ts b/src/services/new/workbook/get-workbook-content.ts index 1a9f9c0e..fd40934b 100644 --- a/src/services/new/workbook/get-workbook-content.ts +++ b/src/services/new/workbook/get-workbook-content.ts @@ -112,7 +112,7 @@ export const getWorkbookContent = async ( {ctx, trx, skipValidation: true, skipCheckPermissions}, { workbookId, - includePermissionsInfo: true, + includePermissionsInfo, }, );