1. Fix the issue of ineffective interception of routing settings

2. The problem of long loading times for optimizing service lists and API portals
This commit is contained in:
Liujian
2025-06-26 17:06:03 +08:00
parent 590f328e07
commit 88bf7d0244
8 changed files with 62759 additions and 60563 deletions
+62748 -60558
View File
File diff suppressed because it is too large Load Diff
+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:"disabled"`
Disable bool `json:"disable"`
}
type InputProxy struct {
@@ -70,7 +70,7 @@ type Edit struct {
Methods *[]string `json:"methods"`
Protocols *[]string `json:"protocols"`
MatchRules *[]Match `json:"match"`
Disable *bool `json:"disabled"`
Disable *bool `json:"disable"`
Upstream *string `json:"upstream"`
}
+1 -1
View File
@@ -35,7 +35,7 @@ type Detail struct {
SimpleDetail
Proxy *Proxy `json:"proxy"`
Protocols []string `json:"protocols"`
Disable bool `json:"disabled"`
Disable bool `json:"disable"`
//Doc map[string]interface{} `json:"doc"`
}
+1
View File
@@ -31,6 +31,7 @@ type EditService struct {
Name *string `json:"name"`
Description *string `json:"description"`
ServiceType *string `json:"service_type"`
Prefix *string `json:"prefix"`
Catalogue *string `json:"catalogue"`
Logo *string `json:"logo"`
Tags *[]string `json:"tags"`
+2 -1
View File
@@ -768,7 +768,7 @@ func (i *imlServiceModule) Create(ctx context.Context, teamID string, input *ser
mo.AsServer = *input.AsServer
}
input.Prefix = strings.Trim(strings.Trim(input.Prefix, " "), "/")
//input.Prefix = strings.Trim(strings.Trim(input.Prefix, " "), "/")
err := i.transaction.Transaction(ctx, func(ctx context.Context) error {
if input.Tags != nil {
tags, err := i.getTagUuids(ctx, input.Tags)
@@ -873,6 +873,7 @@ func (i *imlServiceModule) Edit(ctx context.Context, id string, input *service_d
ServiceType: serviceType,
Catalogue: input.Catalogue,
AdditionalConfig: &info.AdditionalConfig,
Prefix: input.Prefix,
ApprovalType: &approvalType,
EnableMCP: input.EnableMCP,
}
+1 -1
View File
@@ -46,7 +46,7 @@ func (i imlOverviewService) Update(ctx context.Context, serviceId string, update
Service: serviceId,
}
genUpdateFields(info, update)
return i.store.Insert(ctx)
return i.store.Insert(ctx, info)
}
genUpdateFields(info, update)
_, err = i.store.Update(ctx, info)
+3
View File
@@ -229,5 +229,8 @@ func updateHandler(e *service.Service, i *Edit) {
if i.EnableMCP != nil {
e.EnableMCP = *i.EnableMCP
}
//if i.Prefix != nil {
// e.Prefix = *i.Prefix
//}
e.UpdateAt = time.Now()
}
+1
View File
@@ -182,6 +182,7 @@ type Edit struct {
AdditionalConfig *map[string]string
State *int
ApprovalType *ApprovalType
Prefix *string
EnableMCP *bool
}