Skip to content

Commit

Permalink
Merge pull request wso2-extensions#7 from shilmyhasan/master
Browse files Browse the repository at this point in the history
Fix api providers name in tenancy.
  • Loading branch information
chamindias authored Oct 13, 2019
2 parents fbd4950 + d702d77 commit 560b236
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO;
import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClientConstants;
import org.wso2.carbon.apimgt.usage.client.exception.APIMgtUsageQueryServiceClientException;
import org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRestClientImpl;
Expand Down Expand Up @@ -670,6 +671,7 @@ public boolean publishMonetizationUsageRecords(MonetizationUsagePublishInfo last
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
tenantDomain, true);
apiProvider = APIUtil.replaceEmailDomain(apiProvider);
APIIdentifier identifier = new APIIdentifier(apiProvider, apiName, apiVersion);
APIProvider apiProvider1 = APIManagerFactory.getInstance().getAPIProvider(apiProvider);
API api = apiProvider1.getAPI(identifier);
Expand Down

0 comments on commit 560b236

Please sign in to comment.