feat(crm): align nested conversation payloads

This commit is contained in:
2026-06-05 04:05:01 +08:00
parent 9d0e8d40c0
commit fb775b76f6
6 changed files with 74 additions and 9 deletions
+2 -5
View File
@@ -265,16 +265,13 @@ func (h *CompanyHandler) ListConversations(c *gin.Context) {
return
}
pg := pagination.Parse(c)
conversations, total, svcErr := h.svc.ListConversations(c.Request.Context(), uint(companyID), accountID, pg.Offset, pg.PerPage)
conversations, _, svcErr := h.svc.ListConversations(c.Request.Context(), uint(companyID), accountID, 0, 20)
if svcErr != nil {
handleServiceError(c, svcErr)
return
}
_ = total
c.JSON(http.StatusOK, gin.H{"payload": conversations})
c.JSON(http.StatusOK, gin.H{"payload": serializeConversationPayloads(c.Request.Context(), h.svc.DB(), conversations)})
}
func (h *CompanyHandler) SearchContacts(c *gin.Context) {