Skip to content

Commit

Permalink
fix: Fixing list when no sort key provided (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh authored Apr 24, 2020
1 parent da675f5 commit 75f7f0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/ketchup/ketchup.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func New(config Config, targetApp target.App, githubApp github.App, mailerApp ma
}

func (a app) Start() {
cron.New().At("08:00").In(a.timezone).Days().Start(a.checkUpdates, func(err error) {
cron.New().At("08:00").In(a.timezone).Days().Now().Start(a.checkUpdates, func(err error) {
logger.Error("error while running cron: %s", err)
})
}
Expand Down
7 changes: 4 additions & 3 deletions pkg/target/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ func (a app) listTargets(page, pageSize uint, sortKey string, sortAsc bool) ([]T

if sortKeyMatcher.MatchString(sortKey) {
order = sortKey
}
if !sortAsc {
order += " DESC"

if !sortAsc {
order += " DESC"
}
}

offset := (page - 1) * pageSize
Expand Down

0 comments on commit 75f7f0d

Please sign in to comment.