清除密码
This commit is contained in:
1 parent
366b8a4272
commit
dd0005b7ba
2 files changed
+16
-2
No files matched your search
+13
-2
@@ -7,7 +7,15 @@ interface AdminUser {
|
||||
password_reset: number
|
||||
}
|
||||
|
||||
const { isChecking, isAuthenticated, isAdmin, checkSession, fetchStatus, handleAuthError } = useAuth()
|
||||
const {
|
||||
isChecking,
|
||||
isAuthenticated,
|
||||
isAdmin,
|
||||
checkSession,
|
||||
fetchStatus,
|
||||
handleAuthError,
|
||||
getFetchErrorMessage
|
||||
} = useAuth()
|
||||
const toast = useToast()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -42,7 +50,10 @@ async function clearPassword(user: AdminUser) {
|
||||
await loadUsers()
|
||||
} catch (error: unknown) {
|
||||
handleAuthError(error)
|
||||
toast.add({ title: t('users.clearFailed'), color: 'error' })
|
||||
toast.add({
|
||||
title: getFetchErrorMessage(error, t('users.clearFailed')),
|
||||
color: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user