feat(agents): align index pagination
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user