修复 curve 接口的一些问题
This commit is contained in:
+10
-10
@@ -3,32 +3,32 @@ package config
|
||||
import "os"
|
||||
|
||||
type EqualizeConfig struct {
|
||||
APIURL string
|
||||
APIURL string
|
||||
MeasurementBasePath string
|
||||
TargetBasePath string
|
||||
TargetBasePath string
|
||||
}
|
||||
|
||||
func loadEqualize(env string) EqualizeConfig {
|
||||
if os.Getenv("EQ_API_URL") != "" {
|
||||
return EqualizeConfig{
|
||||
APIURL: os.Getenv("EQ_API_URL"),
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", ""),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", ""),
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", "/app/measurements"),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", "/app/targets"),
|
||||
}
|
||||
}
|
||||
|
||||
switch env {
|
||||
case "production":
|
||||
return EqualizeConfig{
|
||||
APIURL: "https://autoeq.app/equalize",
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", ""),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", ""),
|
||||
APIURL: "http://172.31.18.70:8000/equalize",
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", "/app/measurements"),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", "/app/targets"),
|
||||
}
|
||||
default:
|
||||
return EqualizeConfig{
|
||||
APIURL: "https://autoeq.app/equalize",
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", ""),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", ""),
|
||||
MeasurementBasePath: getEnv("MEASUREMENT_BASE_PATH", "/app/measurements"),
|
||||
TargetBasePath: getEnv("TARGET_BASE_PATH", "/app/targets"),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user