default values for system / update collections snapshot

This commit is contained in:
Henry Dollman
2024-07-28 13:16:04 -04:00
parent 517f949a30
commit bb23673547
4 changed files with 17 additions and 99 deletions

View File

@@ -53,20 +53,7 @@ export function AddSystemButton() {
e.preventDefault()
const formData = new FormData(e.target as HTMLFormElement)
const data = Object.fromEntries(formData) as Record<string, any>
data.status = 'pending'
data.users = pb.authStore.model!.id
data.info = {
cpu: 0,
m: 0,
mu: 0,
mp: 0,
mb: 0,
d: 0,
du: 0,
dp: 0,
dr: 0,
dw: 0,
} as SystemStats
try {
setOpen(false)
await pb.collection('systems').create(data)