feat(agents): align index pagination

This commit is contained in:
2026-06-06 02:47:55 +08:00
parent 0ebaa51cbd
commit d49aafd2c3
4 changed files with 42 additions and 13 deletions
+1 -3
View File
@@ -11,7 +11,6 @@ import (
"github.com/gochat/gochat/internal/repository"
"github.com/gochat/gochat/internal/service"
applogger "github.com/gochat/gochat/pkg/logger"
"github.com/gochat/gochat/pkg/pagination"
"github.com/gochat/gochat/pkg/response"
)
@@ -37,8 +36,7 @@ func (h *AgentHandler) List(c *gin.Context) {
return
}
pg := pagination.Parse(c)
agents, total, err := h.svc.List(c.Request.Context(), accountID, pg.Offset, pg.PerPage)
agents, total, err := h.svc.List(c.Request.Context(), accountID, 0, 0)
if err != nil {
applogger.L().Errorf("List agents for account %d: %v", accountID, err)
handleServiceError(c, err)