Changeset 0.28.0.5 (#177)

This commit is contained in:
2026-03-12 15:47:22 +00:00
parent 52bd36ba48
commit 8f20e5fa60
13 changed files with 225 additions and 107 deletions

View File

@@ -46,7 +46,7 @@ func (h *ChannelModelHandler) List(c *gin.Context) {
if roster == nil {
roster = []models.ChannelModel{}
}
c.JSON(http.StatusOK, roster)
c.JSON(http.StatusOK, gin.H{"models": roster})
}
// ── Add ──────────────────────────────────────
@@ -109,6 +109,7 @@ func (h *ChannelModelHandler) Add(c *gin.Context) {
// Return the updated roster
roster, _ := h.stores.Channels.GetModels(c.Request.Context(), channelID)
if roster == nil { roster = []models.ChannelModel{} }
c.JSON(http.StatusCreated, gin.H{"models": roster})
}
@@ -175,6 +176,7 @@ func (h *ChannelModelHandler) Update(c *gin.Context) {
}
roster, _ := h.stores.Channels.GetModels(c.Request.Context(), channelID)
if roster == nil { roster = []models.ChannelModel{} }
c.JSON(http.StatusOK, gin.H{"models": roster})
}
@@ -219,6 +221,7 @@ func (h *ChannelModelHandler) Delete(c *gin.Context) {
}
roster, _ := h.stores.Channels.GetModels(c.Request.Context(), channelID)
if roster == nil { roster = []models.ChannelModel{} }
c.JSON(http.StatusOK, gin.H{"models": roster})
}