From ededc17fa08a1e0122f0097d96726bef8f927d19 Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Thu, 9 Jun 2022 13:58:01 +0300 Subject: [PATCH] fix: throw error when auth not available yet --- api/functions/is-logged-in/is-logged-in.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/is-logged-in/is-logged-in.js b/api/functions/is-logged-in/is-logged-in.js index fc6619c..cf18524 100644 --- a/api/functions/is-logged-in/is-logged-in.js +++ b/api/functions/is-logged-in/is-logged-in.js @@ -20,7 +20,7 @@ const isLoggedInHandler = async (req, res) => { }); const hash = payload.hash; const token = await getAuthTokenByHash(hash); - if (token) + if (!token) throw new Error("Not logged in yet") lnurlService.removeHash(hash).catch();