Skip to content

Commit

Permalink
Merge pull request #71 from shreelakshmijoshi/fix-json-fetch
Browse files Browse the repository at this point in the history
Update file
  • Loading branch information
ankitmashu authored May 10, 2024
2 parents 57635ab + 7c2f915 commit bb18d74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public Future<Void> processSubscriptionMonitoringMessages(JsonObject message) {
private Future<JsonObject> databaseOperations(JsonObject queries) {
LOGGER.trace("databaseOperations started");
Promise<JsonObject> promise = Promise.promise();
LOGGER.debug("Queries are : {}", queries.encode());
Future<JsonObject> insertInPostgres = postgresService.executeWriteQuery(queries);
insertInPostgres
.onSuccess(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public String buildPostgresWriteQuery(JsonObject request) {
String userId = request.getString(USER_ID);
String api = request.getString(API);
String method = request.getString(HTTP_METHOD);
String body = request.getString(BODY);
JsonObject body = request.getJsonObject(BODY);
long responseSize = request.getLong(SIZE);
String isoTime = request.getString(ISO_TIME);
String databaseTableName = config.getString(APD_PG_TABLE_NAME);
Expand All @@ -49,7 +49,7 @@ public String buildPostgresWriteQuery(JsonObject request) {
.replace("$2", userId)
.replace("$3", api)
.replace("$4", method)
.replace("$5", body)
.replace("$5", body.toString())
.replace("$6", Long.toString(responseSize))
.replace("$7", utcTime.toString());
}
Expand Down

0 comments on commit bb18d74

Please sign in to comment.