From d2312648e7df01b43beb947246ddd6264a30dd93 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Tue, 18 Apr 2023 21:49:33 -0400 Subject: [PATCH] abandoned valid login check --- src/utils/utils.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index 225f2a8..c301b6c 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1,26 +1,9 @@ export function checkLogin() { - var cookies = document.cookie.split(';'); if (getSessionKey() !== null) { // The "session" cookie exists - fetch('https://api.bb.gabefarrell.com/userinfo', { - method: 'GET', - headers: { - 'x-session-key': getSessionKey(), - }, - }) - .then(data => data.json()) - .then((result) => { - if (result.status !== 200) { - // key is invalid - handleLogout() - return false - } else { - // key is OK - return true - } - }) + return true } else { - // The "session" cookie doesn't exist or is invalid + // The "session" cookie doesn't exist return false; } }