aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_rooms.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-07 17:04:00 -0400
committerhistoria <[not public]>2026-07-07 17:04:00 -0400
commitbae42946d24bd533cdbc1b271ce14acd752689d0 (patch)
treefee984aead607deb7ba14e8736ff2cda942b9642 /internal/admin/api_rooms.go
parent726997d799edc388cd448e978d5bb0755aaa551c (diff)
downloadthehouseoficarus-bae42946d24bd533cdbc1b271ce14acd752689d0.tar.gz
feat: standardize new room names to Room #<id>
Diffstat (limited to 'internal/admin/api_rooms.go')
-rw-r--r--internal/admin/api_rooms.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/admin/api_rooms.go b/internal/admin/api_rooms.go
index 8b4a28f..49a6601 100644
--- a/internal/admin/api_rooms.go
+++ b/internal/admin/api_rooms.go
@@ -1016,8 +1016,9 @@ func (s *AdminServer) handleCreateEmptyRoom(w http.ResponseWriter, r *http.Reque
}
path := filepath.Join(targetDir, strconv.Itoa(id)+".yaml")
+ roomName := fmt.Sprintf("Room #%d", id)
m := map[string]any{
- "name": "New Room",
+ "name": roomName,
"description": "An empty room.",
}
newContent, writeErr := writeMapAsYAML(path, m)
@@ -1032,5 +1033,5 @@ func (s *AdminServer) handleCreateEmptyRoom(w http.ResponseWriter, r *http.Reque
NewContent: newContent,
IsCreate: true,
})
- writeJSON(w, map[string]any{"room": map[string]any{"id": id, "name": "New Room"}})
+ writeJSON(w, map[string]any{"room": map[string]any{"id": id, "name": roomName}})
}