Skip to content

Commit

Permalink
Merge pull request #116 from Financial-Times/bugfix/UPPSF-4306-hide-c…
Browse files Browse the repository at this point in the history
…reate-param-handling

Strip hideCreate param from responses
  • Loading branch information
atanasdinov committed Mar 21, 2023
2 parents 4dacbe6 + 3135db8 commit 552f307
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private void stripInternalParams(Map<String, Object> content, String key) {
UriBuilder uriBuilder = UriBuilder.fromUri((String) content.get(key));
uriBuilder.replaceQueryParam(TYPE_KEY, null);
uriBuilder.replaceQueryParam(MONITOR_KEY, null);
uriBuilder.replaceQueryParam(HIDE_CREATE_EVENTS_KEY, null);
content.put(key, uriBuilder.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void testThatForResponseWithEmptyLinksArrayTypeParamsInURLsAreStripped()

String responseBody =
"{ \"requestUrl\":"
+ " \"http://example.org/content/notifications?since=2016-07-23T00:00:00.000Z&type=article&type=mediaResource&monitor=false\","
+ " \"http://example.org/content/notifications?since=2016-07-23T00:00:00.000Z&type=article&type=mediaResource&monitor=false&hideCreate=true\","
+ " \"links\": [] }";
String strippedBody =
"{\"requestUrl\":\"http://example.org/content/notifications?since=2016-07-23T00:00:00.000Z\",\"links\":[]}";
Expand Down

0 comments on commit 552f307

Please sign in to comment.