diff --git a/db/src/rest/rest.go b/db/src/rest/rest.go index a921ab9..44ddb2d 100644 --- a/db/src/rest/rest.go +++ b/db/src/rest/rest.go @@ -110,7 +110,7 @@ func (g *RestGateway) getBattery(c *gin.Context) { nodeFilter := buildNodeFilter(allNodes) query := fmt.Sprintf( - `SELECT "node", "battery" FROM "%s" WHERE %s AND time > now() - INTERVAL '3 hour' ORDER BY time DESC`, + `SELECT "node", "battery" FROM "%s" WHERE %s AND time > now() - INTERVAL '30 minutes' ORDER BY time DESC`, g.measurementName, nodeFilter, ) @@ -154,7 +154,7 @@ func (g *RestGateway) getBattery(c *gin.Context) { } battery, hasData := nodeBattery[nodeID] if !hasData { - battery = "offline (3h)" + battery = "offline (30 min)" } result[room][nodeID] = map[string]any{"battery": battery} }