support using duplicate checker to prevent duplicate submissions for new transaction record
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/mayswind/ezbookkeeping/pkg/datastore"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/duplicatechecker"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/exchangerates"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/log"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/mail"
|
||||
@@ -88,6 +89,15 @@ func initializeSystem(c *cli.Context) (*settings.Config, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = duplicatechecker.InitializeDuplicateChecker(config)
|
||||
|
||||
if err != nil {
|
||||
if !isDisableBootLog {
|
||||
log.BootErrorf("[initializer.initializeSystem] initializes duplicate checker failed, because %s", err.Error())
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = mail.InitializeMailer(config)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user