From 6a85d20a037cc4970762d83fbc8f5a279a546622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20Olausson=20Holten=C3=A4s?= Date: Mon, 14 Mar 2022 23:08:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix=20api=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dashboard/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashboard/index.js b/src/dashboard/index.js index f394fba..739d91e 100644 --- a/src/dashboard/index.js +++ b/src/dashboard/index.js @@ -218,7 +218,7 @@ module.exports = async (client) => { optionType: DBD.formTypes.input('https://bg.zyner.org/api/'), getActualSet: async ({ guild, user }) => { const api = await apis.findOne({ guildId: guild.id }); - return api.url || null; + return api ? api.url : null; }, setNew: async ({ guild, newData }) => { const api = await apis.findOne({ guildId: guild.id }); @@ -237,7 +237,7 @@ module.exports = async (client) => { optionType: DBD.formTypes.input('1'), getActualSet: async ({ guild, user }) => { const api = await apis.findOne({ guildId: guild.id }); - return api.token || null; + return api.token ? api.token : null; }, setNew: async ({ guild, newData }) => { const api = await apis.findOne({ guildId: guild.id });