Skip to content

Commit

Permalink
✨ added askTotalCount parameter to accounts query
Browse files Browse the repository at this point in the history
Signed-off-by: dseurotech <[email protected]>
  • Loading branch information
dseurotech committed Apr 10, 2024
1 parent ec9ec75 commit 684cd55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public AccountListResult simpleQuery(
@QueryParam("recursive") boolean recursive, //
@QueryParam("sortParam") String sortParam,
@QueryParam("sortDir") @DefaultValue("ASCENDING") SortOrder sortDir,
@QueryParam("askTotalCount") boolean askTotalCount,
@QueryParam("offset") @DefaultValue("0") int offset, //
@QueryParam("limit") @DefaultValue("50") int limit) throws KapuaException {

Expand All @@ -87,6 +88,7 @@ public AccountListResult simpleQuery(
}

AccountQuery query = accountFactory.newQuery(scopeId);
query.setAskTotalCount(askTotalCount);

AndPredicate andPredicate = query.andPredicate();
if (!Strings.isNullOrEmpty(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ paths:
type: boolean
- $ref: '../openapi.yaml#/components/parameters/sortParam'
- $ref: '../openapi.yaml#/components/parameters/sortDir'
- $ref: '../openapi.yaml#/components/parameters/askTotalCount'
- $ref: '../openapi.yaml#/components/parameters/limit'
- $ref: '../openapi.yaml#/components/parameters/offset'
responses:
Expand Down

0 comments on commit 684cd55

Please sign in to comment.