fix auth interceptors in task and user services;

This commit is contained in:
timka
2025-12-17 18:04:49 +03:00
parent 6fd31915b9
commit 400e26cfff
4 changed files with 52 additions and 1 deletions
+3 -1
View File
@@ -21,6 +21,7 @@ type Config struct {
DBPassword string
DBName string
JWTSecret string
AuthSvcAddr string
}
func Load() (*Config, error) {
@@ -37,6 +38,7 @@ func Load() (*Config, error) {
DBPassword: getEnv("POSTGRES_PASSWORD", "postgres"),
DBName: getEnv("POSTGRES_DATABASE", "postgres"),
JWTSecret: getEnv("JWT_SECRET", "your-secret-key-change-in-production"),
AuthSvcAddr: getEnv("AUTH_SVC_ADDR", "localhost:50051"),
}, nil
}
@@ -73,4 +75,4 @@ func (c Config) BuildPostgresConnStr() string {
func (c Config) BuildPostgresDSN() string {
return fmt.Sprintf("postgresql://%s:%s@%s/%s?sslmode=disable",
c.DBUser, c.DBPassword, net.JoinHostPort(c.DBHost, strconv.Itoa(c.DBPort)), c.DBName)
}
}