From fab79aa6b6e9073501d2f233e2e07d3464d36701 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Sat, 30 May 2026 01:04:54 +0200 Subject: [PATCH] fix(db): add the room in the returned json Signed-off-by: Klagarge --- db/src/rest/rest.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/db/src/rest/rest.go b/db/src/rest/rest.go index 49ecfb5..c02824c 100644 --- a/db/src/rest/rest.go +++ b/db/src/rest/rest.go @@ -365,7 +365,9 @@ func (g *RestGateway) getRoomCurrent(c *gin.Context) { } if it.Next() { - c.JSON(http.StatusOK, it.Value()) + val := it.Value() + val["room"] = roomID + c.JSON(http.StatusOK, val) return } @@ -424,7 +426,9 @@ func (g *RestGateway) getRoomHistory(c *gin.Context) { var history []map[string]any for it.Next() { - history = append(history, it.Value()) + val := it.Value() + val["room"] = roomID + history = append(history, val) } if err := it.Err(); err != nil {