summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/admin/drive
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/admin/drive')
-rw-r--r--src/server/api/endpoints/admin/drive/files.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/api/endpoints/admin/drive/files.ts b/src/server/api/endpoints/admin/drive/files.ts
index 2e54270a0f..6fc83f8191 100644
--- a/src/server/api/endpoints/admin/drive/files.ts
+++ b/src/server/api/endpoints/admin/drive/files.ts
@@ -63,10 +63,12 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
};
}
- const q =
- ps.origin == 'local' ? { host: null } :
- ps.origin == 'remote' ? { host: { $ne: null } } :
- {};
+ const q = {
+ 'metadata.deletedAt': { $exists: false },
+ } as any;
+
+ if (ps.origin == 'local') q['metadata._user.host'] = null;
+ if (ps.origin == 'remote') q['metadata._user.host'] = { $ne: null };
const files = await File
.find(q, {