🐛 backend: fix bug with postgres support when uploading files

This commit is contained in:
Eric Doughty-Papassideris
2024-09-14 22:29:50 +02:00
parent f14ec8bd2d
commit 66525d7e48
@@ -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,