Resolve #2165
This commit is contained in:
parent
3ae42d9b85
commit
ebceffba1e
3 changed files with 71 additions and 37 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue