fix: throw error when auth not available yet

This commit is contained in:
MTG2000
2022-06-09 13:58:01 +03:00
parent d8b7986686
commit ededc17fa0

View File

@@ -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();