diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/routes/service/configGET.js | 3 | ||||
| -rw-r--r-- | src/api/utils/Util.js | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/api/routes/service/configGET.js b/src/api/routes/service/configGET.js index 4baf627..f69d9eb 100644 --- a/src/api/routes/service/configGET.js +++ b/src/api/routes/service/configGET.js @@ -21,7 +21,8 @@ class configGET extends Route { metaThemeColor: Util.config.metaThemeColor, metaDescription: Util.config.metaDescription, metaKeywords: Util.config.metaKeywords, - metaTwitterHandle: Util.metaTwitterHandle + metaTwitterHandle: Util.metaTwitterHandle, + domain: process.env.domain } }); } 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({ |