Skip to content

Commit

Permalink
Merge pull request #1236 from Krishanx92/master
Browse files Browse the repository at this point in the history
Fix issue in URL
  • Loading branch information
CrowleyRajapakse authored Oct 28, 2024
2 parents 41c8f1f + d27114d commit be31ad7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apim-apk-agent/internal/synchronizer/ratelimit_policy_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import (
const (
policiesEndpoint string = "internal/data/v1/api-policies"
policiesByNameEndpoint string = "internal/data/v1/api-policies?policyName="
subscriptionsPoliciesEndpoint string = "internal/data/v1//subscription-policies"
subscriptionsPoliciesByNameEndpoint string = "internal/data/v1//subscription-policies?policyName="
subscriptionsPoliciesEndpoint string = "internal/data/v1/subscription-policies"
subscriptionsPoliciesByNameEndpoint string = "internal/data/v1/subscription-policies?policyName="
)

// FetchRateLimitPoliciesOnEvent fetches the policies from the control plane on the start up and notification event updates
Expand Down Expand Up @@ -252,7 +252,7 @@ func FetchSubscriptionRateLimitPoliciesOnEvent(ratelimitName string, organizatio
if cpName, exists := airl.ObjectMeta.Labels["CPName"]; exists {
found := false
for _, policy := range rateLimitPolicies {
if (policy.Name == cpName) {
if policy.Name == cpName {
found = true
break
}
Expand All @@ -271,7 +271,7 @@ func FetchSubscriptionRateLimitPoliciesOnEvent(ratelimitName string, organizatio
if cpName, exists := rl.ObjectMeta.Labels["CPName"]; exists {
found := false
for _, policy := range rateLimitPolicies {
if (policy.Name == cpName) {
if policy.Name == cpName {
found = true
break
}
Expand All @@ -286,7 +286,7 @@ func FetchSubscriptionRateLimitPoliciesOnEvent(ratelimitName string, organizatio
logger.LoggerSynchronizer.Errorf("Error while fetching ratelimitpolicies for cleaning up outdataed crs. Error: %+v", retrieveAllRLErr)
}
}

for _, policy := range rateLimitPolicies {
if policy.QuotaType == "aiApiQuota" {
if policy.DefaultLimit.AiAPIQuota != nil {
Expand Down

0 comments on commit be31ad7

Please sign in to comment.