fix(db): return window tag in room status

Breakchange in Influx, it's now window_open. Change this tag in the returned json to previous tag "window" to avoir a breaking change

Signed-off-by: Klagarge <remi@heredero.ch>
This commit is contained in:
2026-05-30 20:36:49 +02:00
parent 5a3f8c3c5c
commit 7c000f3b9c

View File

@@ -382,6 +382,8 @@ func (g *RestGateway) getRoomCurrent(c *gin.Context) {
if it.Next() {
val := it.Value()
val["room"] = roomID
val["window"] = val["window_open"]
delete(val, "window_open")
if t, ok := val["time"]; ok {
val["time"] = formatTime(t)
}
@@ -446,6 +448,8 @@ func (g *RestGateway) getRoomHistory(c *gin.Context) {
for it.Next() {
val := it.Value()
val["room"] = roomID
val["window"] = val["window_open"]
delete(val, "window_open")
if t, ok := val["time"]; ok {
val["time"] = formatTime(t)
}