Improve cron list (#3947)

This commit is contained in:
qwerty287
2024-07-20 18:15:38 +02:00
committed by GitHub
parent fed8093520
commit 8a277e7bd9
2 changed files with 8 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ func (s storage) CronFind(repo *model.Repo, id int64) (*model.Cron, error) {
func (s storage) CronList(repo *model.Repo, p *model.ListOptions) ([]*model.Cron, error) {
var crons []*model.Cron
return crons, s.paginate(p).Where("repo_id = ?", repo.ID).Find(&crons)
return crons, s.paginate(p).Where("repo_id = ?", repo.ID).OrderBy("name").Find(&crons)
}
func (s storage) CronUpdate(_ *model.Repo, cron *model.Cron) error {