update api disable to disabled

This commit is contained in:
Liujian
2024-12-31 15:24:36 +08:00
parent 8c5f5326d5
commit b59088c598
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ type CreateAPI struct {
Name string `json:"name"`
Path string `json:"path"`
Description string `json:"description"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
AiPrompt *AiPrompt `json:"ai_prompt"`
AiModel *AiModel `json:"ai_model"`
Timeout int `json:"timeout"`
@@ -33,7 +33,7 @@ type EditAPI struct {
Name *string `json:"name"`
Path *string `json:"path"`
Description *string `json:"description"`
Disable *bool `json:"disable"`
Disable *bool `json:"disabled"`
AiPrompt *AiPrompt `json:"ai_prompt"`
AiModel *AiModel `json:"ai_model"`
Timeout *int `json:"timeout"`
+3 -3
View File
@@ -9,7 +9,7 @@ type API struct {
Name string `json:"name"`
Path string `json:"path"`
Description string `json:"description"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
AiPrompt *AiPrompt `json:"ai_prompt"`
AiModel *AiModel `json:"ai_model"`
Timeout int `json:"timeout"`
@@ -21,7 +21,7 @@ type APIItem struct {
Name string `json:"name"`
RequestPath string `json:"request_path"`
Description string `json:"description"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
Creator auto.Label `json:"creator" aolabel:"user"`
Updater auto.Label `json:"updater" aolabel:"user"`
CreateTime auto.TimeLabel `json:"create_time"`
@@ -40,7 +40,7 @@ type AIAPIItem struct {
Provider ProviderItem `json:"provider"`
UpdateTime auto.TimeLabel `json:"update_time"`
UseToken int64 `json:"use_token"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
}
type ModelItem struct {
+2 -2
View File
@@ -30,7 +30,7 @@ type Create struct {
MatchRules []Match `json:"match"`
Upstream string `json:"upstream"`
Proxy *InputProxy `json:"proxy"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
}
type InputProxy struct {
@@ -69,7 +69,7 @@ type Edit struct {
Methods *[]string `json:"methods"`
Protocols *[]string `json:"protocols"`
MatchRules *[]Match `json:"match"`
Disable *bool `json:"disable"`
Disable *bool `json:"disabled"`
Upstream *string `json:"upstream"`
}
+2 -2
View File
@@ -15,7 +15,7 @@ type Item struct {
Protocols []string `json:"protocols"`
Path string `json:"request_path"`
Description string `json:"description"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
Creator auto.Label `json:"creator" aolabel:"user"`
Updater auto.Label `json:"updater" aolabel:"user"`
CreateTime auto.TimeLabel `json:"create_time"`
@@ -34,7 +34,7 @@ type Detail struct {
SimpleDetail
Proxy *Proxy `json:"proxy"`
Protocols []string `json:"protocols"`
Disable bool `json:"disable"`
Disable bool `json:"disabled"`
//Doc map[string]interface{} `json:"doc"`
}