mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
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:
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user