code refactor

This commit is contained in:
MaysWind
2024-08-19 00:31:32 +08:00
parent 6fcb0a2b3c
commit e86d4e05ce
73 changed files with 1404 additions and 1344 deletions
+3 -2
View File
@@ -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)
},
}