diff options
Diffstat (limited to 'src/api/utils/Util.js')
| -rw-r--r-- | src/api/utils/Util.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index 4e91954..b243b2b 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -289,10 +289,10 @@ class Util { const dbFile = await db.table('files') // eslint-disable-next-line func-names .where(function() { - if (user === undefined) { - this.whereNull('userId'); - } else { + if (user) { this.where('userId', user.id); + } else { + this.whereNull('userId'); } }) .where({ |