Changeset 0.37.14 (#226)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ func (h *ParticipantHandler) List(c *gin.Context) {
|
||||
if participants == nil {
|
||||
participants = []models.ChannelParticipant{}
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"participants": participants})
|
||||
c.JSON(http.StatusOK, gin.H{"data": participants})
|
||||
}
|
||||
|
||||
// ── Add ──────────────────────────────────────
|
||||
@@ -167,7 +167,7 @@ func (h *ParticipantHandler) Add(c *gin.Context) {
|
||||
|
||||
// Return updated participant list
|
||||
participants, _ := h.stores.Channels.ListParticipants(c.Request.Context(), channelID)
|
||||
c.JSON(http.StatusCreated, gin.H{"participants": participants})
|
||||
c.JSON(http.StatusCreated, gin.H{"data": participants})
|
||||
}
|
||||
|
||||
// ── Update Role ─────────────────────────────
|
||||
@@ -220,7 +220,7 @@ func (h *ParticipantHandler) Update(c *gin.Context) {
|
||||
}
|
||||
|
||||
participants, _ := h.stores.Channels.ListParticipants(c.Request.Context(), channelID)
|
||||
c.JSON(http.StatusOK, gin.H{"participants": participants})
|
||||
c.JSON(http.StatusOK, gin.H{"data": participants})
|
||||
}
|
||||
|
||||
// ── Remove ──────────────────────────────────
|
||||
@@ -289,7 +289,7 @@ func (h *ParticipantHandler) Remove(c *gin.Context) {
|
||||
}
|
||||
|
||||
participants, _ := h.stores.Channels.ListParticipants(c.Request.Context(), channelID)
|
||||
c.JSON(http.StatusOK, gin.H{"participants": participants})
|
||||
c.JSON(http.StatusOK, gin.H{"data": participants})
|
||||
}
|
||||
|
||||
// ── Helpers ──────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user