mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
Fix bug
This commit is contained in:
parent
a878353c29
commit
98191b5318
@ -44,7 +44,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
|
|
||||||
const [childFoldersCount, childFilesCount] = await Promise.all([
|
const [childFoldersCount, childFilesCount] = await Promise.all([
|
||||||
DriveFolder.count({ parentId: folder._id }),
|
DriveFolder.count({ parentId: folder._id }),
|
||||||
DriveFile.count({ folderId: folder._id })
|
DriveFile.count({ 'metadata.folderId': folder._id })
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (childFoldersCount !== 0 || childFilesCount !== 0) {
|
if (childFoldersCount !== 0 || childFilesCount !== 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user