Skip to content

Commit b0dee3e

Browse files
committed
refactor: fix lint warning on public/js/lib/common/login.js
Signed-off-by: BoHong Li <[email protected]>
1 parent bf727b5 commit b0dee3e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

public/js/lib/common/login.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@ export function checkIfAuth (yesCallback, noCallback) {
6060
if (checkLoginStateChanged()) checkAuth = false
6161
if (!checkAuth || typeof cookieLoginState === 'undefined') {
6262
$.get(`${serverurl}/me`)
63-
.done(data => {
64-
if (data && data.status === 'ok') {
65-
profile = data
66-
yesCallback(profile)
67-
setLoginState(true, data.id)
68-
} else {
69-
noCallback()
70-
setLoginState(false)
71-
}
72-
})
73-
.fail(() => {
74-
noCallback()
75-
})
76-
.always(() => {
77-
checkAuth = true
78-
})
63+
.done(data => {
64+
if (data && data.status === 'ok') {
65+
profile = data
66+
yesCallback(profile)
67+
setLoginState(true, data.id)
68+
} else {
69+
noCallback()
70+
setLoginState(false)
71+
}
72+
})
73+
.fail(() => {
74+
noCallback()
75+
})
76+
.always(() => {
77+
checkAuth = true
78+
})
7979
} else if (cookieLoginState) {
8080
yesCallback(profile)
8181
} else {

0 commit comments

Comments
 (0)