aboutsummaryrefslogtreecommitdiff
path: root/src/api/utils
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2021-08-22 16:33:28 +0300
committerGitHub <[email protected]>2021-08-22 22:33:28 +0900
commita8b985240d2be4d73dad0a0174b57f8b0652f846 (patch)
tree832d9020560c68b82f7e01118f22a61159279cab /src/api/utils
parentMerge pull request #283 from Devices/patch-1 (diff)
downloadhost.fuwn.me-a8b985240d2be4d73dad0a0174b57f8b0652f846.tar.xz
host.fuwn.me-a8b985240d2be4d73dad0a0174b57f8b0652f846.zip
fix: anon upload and domain fix for album links (#292)
Diffstat (limited to 'src/api/utils')
-rw-r--r--src/api/utils/Util.js6
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({