Skip to content

Commit

Permalink
[CONTROLLER/HTTP] unifies url slash
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengya authored and SongZhen0704 committed Aug 17, 2023
1 parent 47e9f6a commit 5175b7d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
40 changes: 20 additions & 20 deletions server/controller/http/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ const (
const (
PATH_REGION = "/v2/regions"
PATH_AZ = "/v2/azs"
PATH_HOST = "/v2/hosts/"
PATH_HOST = "/v2/hosts"
PATH_VM = "/v2/vms"
PATH_VROUTER = "/v2/routers"
PATH_ROUTINE_TABLE = "/v2/routing-tables"
PATH_VINTERFACE = "/v2/vinterfaces/"
PATH_VINTERFACE = "/v2/vinterfaces"
PATH_SECURITY_GROUP = "/v2/security-groups"
PATH_SECURITY_GROUP_RULE = "/v2/security-group-rules"
PATH_NAT_GATEWAY = "/v2/nat-gateways"
PATH_NAT_RULE = "/v2/nat-rules"
PATH_LB = "/v2/lbs/"
PATH_LB_LISTENER = "/v2/lb-listeners/"
PATH_LB = "/v2/lbs"
PATH_LB_LISTENER = "/v2/lb-listeners"
PATH_LB_RULE = "/v2/lb-rules"
PATH_PEER_CONNECTION = "/v2/peer-connections"
PATH_CEN = "/v2/cens"
PATH_RDS_INSTANCE = "/v2/rds-instances/"
PATH_REDIS_INSTANCE = "/v2/redis-instances/"
PATH_POD = "/v2/pods/"
PATH_POD_GROUP = "/v2/pod-groups/"
PATH_POD_GROUP_PORT = "/v2/pod-group-ports/"
PATH_POD_REPLICA_SET = "/v2/pod-replica-sets/"
PATH_POD_SERVICE = "/v2/pod-services/"
PATH_POD_SERVICE_PORT = "/v2/pod-service-ports/"
PATH_POD_INGRESS = "/v2/pod-ingresses/"
PATH_POD_INGRESS_RULE = "/v2/pod-ingress-rules/"
PATH_POD_NODE = "/v2/pod-nodes/"
PATH_POD_CLUSTER = "/v2/pod-clusters/"
PATH_POD_NAMESPACE = "/v2/pod-namespaces/"
PATH_VPC = "/v2/epcs/"
PATH_NETWORK = "/v2/subnets/"
PATH_ALL_IP = "/v2/all-ips/"
PATH_RDS_INSTANCE = "/v2/rds-instances"
PATH_REDIS_INSTANCE = "/v2/redis-instances"
PATH_POD = "/v2/pods"
PATH_POD_GROUP = "/v2/pod-groups"
PATH_POD_GROUP_PORT = "/v2/pod-group-ports"
PATH_POD_REPLICA_SET = "/v2/pod-replica-sets"
PATH_POD_SERVICE = "/v2/pod-services"
PATH_POD_SERVICE_PORT = "/v2/pod-service-ports"
PATH_POD_INGRESS = "/v2/pod-ingresses"
PATH_POD_INGRESS_RULE = "/v2/pod-ingress-rules"
PATH_POD_NODE = "/v2/pod-nodes"
PATH_POD_CLUSTER = "/v2/pod-clusters"
PATH_POD_NAMESPACE = "/v2/pod-namespaces"
PATH_VPC = "/v2/epcs"
PATH_NETWORK = "/v2/subnets"
PATH_ALL_IP = "/v2/all-ips"
)

const (
Expand Down
1 change: 0 additions & 1 deletion server/controller/http/router/resource/rds_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,4 @@ func (p *RDSInstance) Get(c *gin.Context) {

data, err := service.Get()
common.JsonResponse(c, data, err)

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func Get(resourceType string, cfg *RequiredConfigs) FilterGenerator {
return NewPeerConnection()
case common.RESOURCE_TYPE_CEN_EN:
return NewCEN()
case common.RESOURCE_TYPE_RDS_INSTANCE_EN:
return NewRDSInstance(cfg.FPermit)
case common.RESOURCE_TYPE_REDIS_INSTANCE_EN:
return NewRedisInstance(cfg.FPermit)
case common.RESOURCE_TYPE_POD_CLUSTER_EN:
return NewPodCluster(cfg.FPermit)
case common.RESOURCE_TYPE_POD_NODE_EN:
Expand Down

0 comments on commit 5175b7d

Please sign in to comment.