Sort agents list by ID (#2795)

This commit is contained in:
Thomas Anderson 2023-11-10 03:11:11 +03:00 committed by GitHub
parent 9f9127b093
commit 08f47afbd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ var ErrNoTokenProvided = errors.New("Please provide a token")
func (s storage) AgentList(p *model.ListOptions) ([]*model.Agent, error) {
var agents []*model.Agent
return agents, s.paginate(p).Find(&agents)
return agents, s.paginate(p).OrderBy("id").Find(&agents)
}
func (s storage) AgentFind(id int64) (*model.Agent, error) {