Skip to content

Commit

Permalink
Merge pull request #67 from ankitmashu/main
Browse files Browse the repository at this point in the history
updated ogc audit
  • Loading branch information
pranavrd authored May 9, 2024
2 parents bb7b8a3 + 4f685c6 commit 173a2c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ private PgPool poolForOrigin(String originServer) {
case ACL_APD_SERVER:
case DMP_APD_SERVER:
case CONSENT_LOG_ADEX:
case OGC_SERVER:
return pgClientForRs;
case AAA_SERVER:
return pgClientForAaa;
case CAT_SERVER:
return pgClientForCat;
case OGC_SERVER:
return pgClientForOgc;
default:
throw new IllegalArgumentException(originServer + " serverOrigin is not defined");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public String buildImmudbWriteQuery(JsonObject request) {
String isoTime = request.getString(ISO_TIME);
long responseSize = request.getLong(SIZE);
String resourceGroup = request.getString(RESOURCE_GROUP);
JsonObject requestJson = request.getJsonObject(REQUEST_JSON);
String databaseTableName = config.getString(OGC_IMMUDB_TABLE_NAME);
return OGC_WRITE_QUERY_IMMUDB
.replace("$0", databaseTableName)
Expand All @@ -89,8 +88,7 @@ public String buildImmudbWriteQuery(JsonObject request) {
.replace("$6", isoTime)
.replace("$7", providerId)
.replace("$8", Long.toString(responseSize))
.replace("$9", resourceGroup)
.replace("$a", requestJson.toString());
.replace("$9", resourceGroup);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Constants {
public static final String ID = "id";
public static final String USER_ID = "userid";
public static final String PRIMARY_KEY = "primaryKey";
public static final String PROVIDER_ID = "providerID";
public static final String PROVIDER_ID = "providerId";
public static final String ISO_TIME = "isoTime";
public static final String BODY = "body";
public static final String IUDX_ID = "iudxID";
Expand Down Expand Up @@ -95,8 +95,8 @@ public class Constants {
public static final String DELETE_QUERY_CONSENT = "DELETE FROM $0 WHERE _id = '$1';";

public static final String OGC_WRITE_QUERY_IMMUDB =
"INSERT INTO $0 (id,api,userid,epochtime,resourceid,isotime,providerid,size,resource_group,request_json) "
+ "VALUES ('$1','$2','$3',$4,'$5','$6','$7',$8,'$9','$a')";
"INSERT INTO $0 (id,api,userid,epochtime,resourceid,isotime,providerid,size,resource_group) "
+ "VALUES ('$1','$2','$3',$4,'$5','$6','$7',$8,'$9')";
public static final String OGC_WRITE_QUERY_PG =
"INSERT INTO $0 "
+ "(id,userid,api,request_json,size,resourceid,providerid,resource_group,epochtime,time,isotime,delegator_id)"
Expand Down

0 comments on commit 173a2c8

Please sign in to comment.