From 66525d7e482542f49af712020f2cb021589e16ca Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Sat, 14 Sep 2024 22:29:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20backend:=20fix=20bug=20with=20po?= =?UTF-8?q?stgres=20support=20when=20uploading=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/backend/node/src/services/documents/services/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/services/documents/services/index.ts b/tdrive/backend/node/src/services/documents/services/index.ts index 28f32018..e6779ab4 100644 --- a/tdrive/backend/node/src/services/documents/services/index.ts +++ b/tdrive/backend/node/src/services/documents/services/index.ts @@ -227,7 +227,7 @@ export class DocumentsService { if (options?.pagination) { const { page_token, limitStr } = options.pagination; const pageNumber = - dbType === "mongodb" ? parseInt(page_token) : parseInt(page_token) / parseInt(limitStr) + 1; + dbType === "mongodb" ? parseInt(page_token) : parseInt(page_token) / parseInt(limitStr); pagination = new Pagination(`${pageNumber}`, `${limitStr}`, false); } @@ -441,7 +441,7 @@ export class DocumentsService { ); // TODO: notify the user a document has been added to the directory shared with them try { - if (driveItem.parent_id !== "root" && driveItem.parent_id !== "trash") { + if (!isVirtualFolder(driveItem.parent_id)) { const parentItem = await this.repository.findOne( { id: driveItem.parent_id,