Fixed last updated value on datapoints

This commit is contained in:
Magnus Åhall 2024-05-20 18:57:47 +02:00
parent 7724c742ad
commit e4dbabfea5
2 changed files with 3 additions and 1 deletions

View File

@ -117,6 +117,8 @@ func DatapointAdd[T any](name string, value T) (err error) { // {{{
return return
} }
service.Db.Conn.Exec(`UPDATE datapoint SET last_value = NOW() WHERE name=$1`, name)
return return
} // }}} } // }}}

View File

@ -268,7 +268,7 @@ func entryDatapoint(w http.ResponseWriter, r *http.Request, sess *session.T) { /
WHERE WHERE
service=$1 AND service=$1 AND
prio=$2 prio=$2
`, `,
(*notificationService).GetType(), (*notificationService).GetType(),
(*notificationService).GetPrio(), (*notificationService).GetPrio(),
problemID, problemID,