Skip to content

Commit fca4266

Browse files
committed
refactor: streamline loading state handling and update login endpoint case
1 parent dea6702 commit fca4266

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

ui/src/api/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ldapLogin: (request: LoginRequest, loading?: Ref<boolean>) => Promise<Resu
2222
request,
2323
loading
2424
) => {
25-
return post('/ldap/login', request, undefined, loading)
25+
return post('/LDAP/login', request, undefined, loading)
2626
}
2727
/**
2828
* 获取图形验证码

ui/src/views/login/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ const login = () => {
283283
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
284284
router.push({ name: 'home' })
285285
})
286-
.catch(() => {
287-
loading.value = false
288-
})
286+
.finally(() => (loading.value = false))
289287
} else {
290288
const publicKey = forge.pki.publicKeyFromPem(user.rasKey)
291289
const encrypted = publicKey.encrypt(JSON.stringify(loginForm.value), 'RSAES-PKCS1-V1_5')

0 commit comments

Comments
 (0)