feat: add deploy webhook endpoint (POST /api/v1/_deploy)
This commit is contained in:
@@ -23,6 +23,7 @@ type Config struct {
|
||||
LLMEndpoint string
|
||||
GoogleClientID string
|
||||
JWTSecret string
|
||||
DeploySecret string
|
||||
}
|
||||
|
||||
func LoadFromEnv() Config {
|
||||
@@ -38,6 +39,7 @@ func LoadFromEnv() Config {
|
||||
LLMEndpoint: envOrDefault("TUTOR_LLM_ENDPOINT", ""),
|
||||
GoogleClientID: envOrDefault("GOOGLE_CLIENT_ID", ""),
|
||||
JWTSecret: envOrDefault("JWT_SECRET", ""),
|
||||
DeploySecret: envOrDefault("TUTOR_DEPLOY_SECRET", ""),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +47,10 @@ func (c Config) HasLLM() bool {
|
||||
return c.LLMEndpoint != ""
|
||||
}
|
||||
|
||||
func (c Config) HasDeploy() bool {
|
||||
return c.DeploySecret != ""
|
||||
}
|
||||
|
||||
func envOrDefault(key string, fallback string) string {
|
||||
value := os.Getenv(key)
|
||||
if value == "" {
|
||||
|
||||
Reference in New Issue
Block a user