Skip to content

Commit

Permalink
Add business info to search result DTOs for publisher portal & dev po…
Browse files Browse the repository at this point in the history
…rtal
  • Loading branch information
dulithsenanayake authored and HiranyaKavishani committed Nov 13, 2023
1 parent 873a457 commit d665b8d
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,14 @@ public API updateAPI(API api, API existingAPI) throws APIManagementException {
apiLogObject.put(APIConstants.AuditLogConstants.CONTEXT, api.getContext());
apiLogObject.put(APIConstants.AuditLogConstants.VERSION, api.getId().getVersion());
apiLogObject.put(APIConstants.AuditLogConstants.PROVIDER, api.getId().getProviderName());
try {
api.setCreatedTime(existingAPI.getCreatedTime());
apiPersistenceInstance.updateAPI(new Organization(organization), APIMapper.INSTANCE.toPublisherApi(api));
} catch (APIPersistenceException e) {
throw new APIManagementException("Error while updating API details", e);
}
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.API, apiLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);

//Validate Transports
validateAndSetTransports(api);
Expand All @@ -851,8 +859,7 @@ public API updateAPI(API api, API existingAPI) throws APIManagementException {
} catch (APIPersistenceException e) {
throw new APIManagementException("Error while updating API details", e);
}
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.API, apiLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);


//notify key manager with API update
registerOrUpdateResourceInKeyManager(api, tenantDomain);
Expand Down

0 comments on commit d665b8d

Please sign in to comment.