generated from VLADIMIR/template
updates email
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
@@ -58,12 +59,19 @@ func main() {
|
||||
}
|
||||
|
||||
usersRepo := users_repo.NewUserRepo(dbpool)
|
||||
passwordGenerator := password_generator.NewGenerator(8)
|
||||
passwordGenerator := password_generator.NewGenerator(12)
|
||||
smtpTimeout := 10 * time.Second
|
||||
if v := os.Getenv("SMTP_TIMEOUT"); v != "" {
|
||||
if d, err := time.ParseDuration(v); err == nil && d > 0 {
|
||||
smtpTimeout = d
|
||||
}
|
||||
}
|
||||
emailSender := email_sender.NewSender(
|
||||
os.Getenv("SMTP_HOST"),
|
||||
os.Getenv("SMTP_PORT"),
|
||||
os.Getenv("SMTP_USER"),
|
||||
os.Getenv("SMTP_PASSWORD"),
|
||||
smtpTimeout,
|
||||
)
|
||||
processorJWT := processor_jwt.NewProcessor(os.Getenv("JWT_SECRET"))
|
||||
refreshTokensRepo := refresh_tokens_repo.NewRefreshTokensRepo(dbpool)
|
||||
|
||||
Reference in New Issue
Block a user