diff --git a/pkg/ketchup/ketchup.go b/pkg/ketchup/ketchup.go index b09a021e..b56af7b4 100644 --- a/pkg/ketchup/ketchup.go +++ b/pkg/ketchup/ketchup.go @@ -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) }) } diff --git a/pkg/target/db.go b/pkg/target/db.go index 41e31b65..69a73ab9 100644 --- a/pkg/target/db.go +++ b/pkg/target/db.go @@ -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