From 98191b53183b569501a33947d8c06b8ac358f9a9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 26 Oct 2018 15:06:27 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/drive/folders/delete.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/endpoints/drive/folders/delete.ts b/src/server/api/endpoints/drive/folders/delete.ts index ece16ebed..41f910878 100644 --- a/src/server/api/endpoints/drive/folders/delete.ts +++ b/src/server/api/endpoints/drive/folders/delete.ts @@ -44,7 +44,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = const [childFoldersCount, childFilesCount] = await Promise.all([ DriveFolder.count({ parentId: folder._id }), - DriveFile.count({ folderId: folder._id }) + DriveFile.count({ 'metadata.folderId': folder._id }) ]); if (childFoldersCount !== 0 || childFilesCount !== 0) {