Skip to content

Commit

Permalink
Merge pull request #6 from dictrigyn/update_user_auth
Browse files Browse the repository at this point in the history
revert changes
  • Loading branch information
yogeshsarmalkar-trigyn authored Oct 28, 2023
2 parents c35e467 + 643225d commit 821b30a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
3 changes: 1 addition & 2 deletions controller/app/controllers/BaseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ public static Result createSuccessResponse(Request request, Response response) {
}
logTelemetry(response, request);
return Results.ok(Json.toJson(response))
.withHeader(HeaderParam.X_Response_Length.getName(), value)
.withHeader("jsonNode", Json.toJson(response).toString());
.withHeader(HeaderParam.X_Response_Length.getName(), value);
}

/**
Expand Down
17 changes: 1 addition & 16 deletions controller/app/controllers/usermanagement/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public CompletionStage<Result> createUserV3(Http.Request httpRequest) {
}

public CompletionStage<Result> createSSUUser(Http.Request httpRequest) {
CompletionStage<Result> userResponse = handleRequest(
return handleRequest(
ssuUserCreateActor,
ActorOperations.CREATE_SSU_USER.getValue(),
httpRequest.body().asJson(),
Expand All @@ -125,21 +125,6 @@ public CompletionStage<Result> createSSUUser(Http.Request httpRequest) {
null,
true,
httpRequest);
userResponse.thenAccept(x -> {
JSONObject json = new JSONObject(x.asScala().header().headers().get("jsonNode").get());
String userId = json.getJSONObject("result").getString("userId");
System.out.println("UserId == " + userId);
ObjectNode node = (ObjectNode) httpRequest.asScala().body().asJson();
ObjectNode locationJson = node.with("request").with("location")
.put("userId", userId);
JsonNode requestJson = node.set("request", locationJson);
System.out.println("************location json ****** = " + locationJson.toPrettyString());
System.out.println("************httpRequest json******* = " + requestJson.toPrettyString());
updateUserV4(httpRequest, requestJson);
System.out.println("update location data successfully for userId = " + userId);
});

return userResponse;
}


Expand Down

0 comments on commit 821b30a

Please sign in to comment.