diff options
author | Sheogorath | 2019-06-04 16:09:46 +0200 |
---|---|---|
committer | GitHub | 2019-06-04 16:09:46 +0200 |
commit | 6462968e84e8d92292dd23764a9e558d7800147d (patch) | |
tree | 03ab6b40402c79c766ffa05a0a09118c6987d540 /public/js/lib/common | |
parent | ae32a129303fd14b3b2bd2f5b7bb0b0c0c8a7f81 (diff) | |
parent | 4da68597f701376307fe8849ed57edd3a80833ed (diff) |
Merge pull request #97 from SISheogorath/fix/linting
Fix eslint warnings
Diffstat (limited to 'public/js/lib/common')
-rw-r--r-- | public/js/lib/common/login.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/public/js/lib/common/login.js b/public/js/lib/common/login.js index 18cd377d..28e5b470 100644 --- a/public/js/lib/common/login.js +++ b/public/js/lib/common/login.js @@ -60,22 +60,22 @@ export function checkIfAuth (yesCallback, noCallback) { if (checkLoginStateChanged()) checkAuth = false if (!checkAuth || typeof cookieLoginState === 'undefined') { $.get(`${serverurl}/me`) - .done(data => { - if (data && data.status === 'ok') { - profile = data - yesCallback(profile) - setLoginState(true, data.id) - } else { - noCallback() - setLoginState(false) - } - }) - .fail(() => { - noCallback() - }) - .always(() => { - checkAuth = true - }) + .done(data => { + if (data && data.status === 'ok') { + profile = data + yesCallback(profile) + setLoginState(true, data.id) + } else { + noCallback() + setLoginState(false) + } + }) + .fail(() => { + noCallback() + }) + .always(() => { + checkAuth = true + }) } else if (cookieLoginState) { yesCallback(profile) } else { |