diff options
author | Sheogorath | 2019-05-31 00:27:56 +0200 |
---|---|---|
committer | Sheogorath | 2019-05-31 00:30:29 +0200 |
commit | 4da68597f701376307fe8849ed57edd3a80833ed (patch) | |
tree | fb50db25c63b3b2cb70426ba3eab42007be60134 /public/js/lib/common | |
parent | 3eca0a74ae3d87a42acb7c7b8e39e2c389e3c96c (diff) |
Fix eslint warnings
Since we are about to release it's time to finally fix our linting. This
patch basically runs eslint --fix and does some further manual fixes.
Also it sets up eslint to fail on every warning on order to make
warnings visable in the CI process.
There should no functional change be introduced.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
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 { |