limit fields when fetching server list

This commit is contained in:
Henry Dollman
2024-09-16 18:40:11 -04:00
parent 812fe20df7
commit ec95f63806

View File

@@ -40,18 +40,14 @@ const verifyAuth = () => {
} }
export const updateSystemList = async () => { export const updateSystemList = async () => {
// try { const records = await pb
const records = await pb.collection<SystemRecord>('systems').getFullList({ sort: '+name' }) .collection<SystemRecord>('systems')
.getFullList({ sort: '+name', fields: 'id,name,host,info,status' })
if (records.length) { if (records.length) {
$systems.set(records) $systems.set(records)
} else { } else {
verifyAuth() verifyAuth()
} }
// }
// catch (e) {
// console.log('verifying auth error', e)
// verifyAuth()
// }
} }
export const updateAlerts = () => { export const updateAlerts = () => {