Skip to content

Commit

Permalink
fix organization field in sub
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindu1st committed Feb 21, 2024
1 parent 0d10fb1 commit cfc0248
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apim-apk-agent/internal/eventhub/marshaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func MarshalSubscription(subscriptionInternal *types.Subscription) managementser
sub := managementserver.Subscription{
SubStatus: subscriptionInternal.SubscriptionState,
UUID: subscriptionInternal.SubscriptionUUID,
Organization: subscriptionInternal.TenantDomain,
Organization: subscriptionInternal.ApplicationOrganization,
SubscribedAPI: &managementserver.SubscribedAPI{Name: subscriptionInternal.APIName, Version: subscriptionInternal.APIVersion},
TimeStamp: subscriptionInternal.TimeStamp,
}
Expand Down
27 changes: 14 additions & 13 deletions apim-apk-agent/pkg/eventhub/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ package types

// Subscription for struct subscription
type Subscription struct {
SubscriptionID int32 `json:"subscriptionId"`
SubscriptionUUID string `json:"subscriptionUUID"`
PolicyID string `json:"policyId"`
APIID int32 `json:"apiId"`
APIUUID string `json:"apiUUID"`
AppID int32 `json:"appId" json:"applicationId"`
ApplicationUUID string `json:"applicationUUID"`
SubscriptionState string `json:"subscriptionState"`
TenantID int32 `json:"tenanId,omitempty"`
TenantDomain string `json:"tenanDomain,omitempty"`
TimeStamp int64 `json:"timeStamp,omitempty"`
APIName string `json:"apiName"`
APIVersion string `json:"apiVersion"`
SubscriptionID int32 `json:"subscriptionId"`
SubscriptionUUID string `json:"subscriptionUUID"`
PolicyID string `json:"policyId"`
APIID int32 `json:"apiId"`
APIUUID string `json:"apiUUID"`
AppID int32 `json:"appId" json:"applicationId"`
ApplicationUUID string `json:"applicationUUID"`
SubscriptionState string `json:"subscriptionState"`
TenantID int32 `json:"tenanId,omitempty"`
APIOrganization string `json:"apiOrganization,omitempty"`
ApplicationOrganization string `json:"applicationOrganization,omitempty"`
TimeStamp int64 `json:"timeStamp,omitempty"`
APIName string `json:"apiName"`
APIVersion string `json:"apiVersion"`
}

// SubscriptionList for struct list of applications
Expand Down

0 comments on commit cfc0248

Please sign in to comment.