mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
supress pocketbase auto cancellation error
This commit is contained in:
@@ -43,13 +43,20 @@ const verifyAuth = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const updateSystemList = async () => {
|
export const updateSystemList = async () => {
|
||||||
const records = await pb
|
try {
|
||||||
.collection<SystemRecord>("systems")
|
const records = await pb
|
||||||
.getFullList({ sort: "+name", fields: "id,name,host,info,status" })
|
.collection<SystemRecord>("systems")
|
||||||
if (records.length) {
|
.getFullList({ sort: "+name", fields: "id,name,host,info,status" })
|
||||||
$systems.set(records)
|
if (records.length) {
|
||||||
} else {
|
$systems.set(records)
|
||||||
verifyAuth()
|
} else {
|
||||||
|
verifyAuth()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// @ts-ignore supress pocketbase auto cancellation error
|
||||||
|
if (err.isAbort) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user