diff --git a/internal/infra/db/cli.go b/internal/infra/db/cli.go index bc4d1d9..d429984 100644 --- a/internal/infra/db/cli.go +++ b/internal/infra/db/cli.go @@ -31,39 +31,3 @@ func AutoMigrate(params CommandMigrateParams) error { return params.Shut.Shutdown() } - -// type CommandMigrate struct { -// Logger *zap.Logger -// DB *gorm.DB -// Shut fx.Shutdowner -// } - -// func NewCommandMigrate(params CommandMigrateParams) *CommandMigrate { -// return &CommandMigrate{ -// Logger: params.Logger, -// DB: params.DB, -// Shut: params.Shut, -// } -// } - -// func (c *CommandMigrate) Cmd() string { -// return "db:auto-migrate" -// } - -// func (c *CommandMigrate) Run(args ...string) error { -// err := c.DB.Transaction(func(tx *gorm.DB) error { -// for _, v := range migrations { -// if err := v(tx); err != nil { -// return err -// } -// } -// return nil -// }) -// if err != nil { -// return err -// } - -// c.Logger.Info("Migrations completed") - -// return c.Shut.Shutdown() -// } diff --git a/internal/sms-gateway/services/auth.go b/internal/sms-gateway/services/auth.go index bbaaa26..d8e095f 100644 --- a/internal/sms-gateway/services/auth.go +++ b/internal/sms-gateway/services/auth.go @@ -3,9 +3,9 @@ package services import ( "fmt" - "github.com/capcom6/sms-gateway/internal/infra/crypto" "github.com/capcom6/sms-gateway/internal/sms-gateway/models" "github.com/capcom6/sms-gateway/internal/sms-gateway/repositories" + "github.com/capcom6/sms-gateway/pkg/crypto" "github.com/jaevor/go-nanoid" ) diff --git a/internal/infra/crypto/passwords.go b/pkg/crypto/passwords.go similarity index 100% rename from internal/infra/crypto/passwords.go rename to pkg/crypto/passwords.go