Skip to content

Commit

Permalink
Merge pull request #2119 from HubSpot/add-orderDirection
Browse files Browse the repository at this point in the history
Add orderDirection param
  • Loading branch information
fabatef authored Jul 17, 2020
2 parents 938c3c0 + ccc9363 commit 7d53ef8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,8 @@ public void deleteSlave(String slaveId) {
* Long millis to filter request histories created before
* @param createdAfter
* Long millis to filter request histories created after
* @param orderDirection
* Sort order by createdAt
* @param count
* Number of items to return per page
* @param page
Expand All @@ -1685,6 +1687,7 @@ public Collection<SingularityRequestHistory> getHistoryForRequest(
String requestId,
Optional<Long> createdBefore,
Optional<Long> createdAfter,
Optional<OrderDirection> orderDirection,
Optional<Integer> count,
Optional<Integer> page
) {
Expand All @@ -1703,6 +1706,10 @@ public Collection<SingularityRequestHistory> getHistoryForRequest(
queryParamsBuilder.put("createdAfter", createdAfter.get());
}

if (orderDirection.isPresent()) {
queryParamsBuilder.put("orderDirection", orderDirection.get());
}

if (count.isPresent()) {
queryParamsBuilder.put("count", count.get());
}
Expand Down Expand Up @@ -1733,6 +1740,7 @@ public Collection<SingularityRequestHistory> getHistoryForRequest(
requestId,
Optional.empty(),
Optional.empty(),
Optional.empty(),
count,
page
);
Expand Down

0 comments on commit 7d53ef8

Please sign in to comment.