Skip to content

Commit

Permalink
added type and resourceGroup for auditing_rs
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitmashu committed Sep 13, 2023
1 parent d057923 commit 97225a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,14 @@ private void updateAuditTable(RoutingContext context) {
}
JsonObject jsonObject = CatalogueService.getCatalogueItemJson(resourceid);
String providerID = jsonObject.getString("provider");
String type =
jsonObject.containsKey(RESOURCE_GROUP) ? "RESOURCE" : "RESOURCE_GROUP";
String resourceGroup =
jsonObject.containsKey(RESOURCE_GROUP)
? jsonObject.getString(RESOURCE_GROUP)
: jsonObject.getString(ID);
request.put(RESOURCE_GROUP, resourceGroup);
request.put(TYPE_KEY, type);
request.put(EPOCH_TIME,time);
request.put(ISO_TIME,isoTime);
request.put(USER_ID, authInfo.getValue(USER_ID));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ public class ApiServerConstants {
public static final String IID = "iid";
public static final String API = "api";
public static final String USER_ID = "userid";
public static final String RESOURCE_GROUP = "resourceGroup";
public static final String TYPE_KEY = "type";
public static final String GEO_QUERY = "geo-query";
public static final String TEMPORAL_QUERY = "temporal-query";

Expand Down

0 comments on commit 97225a6

Please sign in to comment.