mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
code refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cron
|
||||
|
||||
import (
|
||||
"github.com/mayswind/ezbookkeeping/pkg/core"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/services"
|
||||
)
|
||||
|
||||
@@ -11,7 +12,7 @@ var RemoveExpiredTokensJob = &CronJob{
|
||||
Period: CronJobFixedHourPeriod{
|
||||
Hour: 0,
|
||||
},
|
||||
Run: func() error {
|
||||
return services.Tokens.DeleteAllExpiredTokens(nil)
|
||||
Run: func(c *core.CronContext) error {
|
||||
return services.Tokens.DeleteAllExpiredTokens(c)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user