feat(crm): align nested conversation payloads
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user