refactor: migrate from raw pgx to GORM, unify ErrNoRows, cleanup auth
This commit is contained in:
@@ -10,11 +10,11 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
ServerPort string
|
||||
DatabaseURL string
|
||||
JWTSecret string
|
||||
JWTExpiration time.Duration
|
||||
JWTRefreshExpiration time.Duration
|
||||
ServerPort string
|
||||
DatabaseURL string
|
||||
JWTSecret string
|
||||
JWTExpiration time.Duration
|
||||
JWTRefreshExpiration time.Duration
|
||||
}
|
||||
|
||||
func Load() (*Config, error) {
|
||||
@@ -23,8 +23,11 @@ func Load() (*Config, error) {
|
||||
}
|
||||
|
||||
cfg := &Config{
|
||||
ServerPort: getEnv("SERVER_PORT", "8080"),
|
||||
DatabaseURL: getEnv("DATABASE_URL", "postgres://localhost:5432/aegisguard?sslmode=disable"),
|
||||
ServerPort: getEnv("SERVER_PORT", "8080"),
|
||||
DatabaseURL: getEnv(
|
||||
"DATABASE_URL",
|
||||
"postgres://localhost:5432/aegisguard?sslmode=disable",
|
||||
),
|
||||
JWTSecret: getEnv("JWT_SECRET", ""),
|
||||
JWTExpiration: 24 * time.Hour,
|
||||
JWTRefreshExpiration: 7 * 24 * time.Hour,
|
||||
|
||||
Reference in New Issue
Block a user