Skip to content

Commit

Permalink
List all parameters taken by the bulk service
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Oct 18, 2023
1 parent 2af3b0a commit 08b466c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion h/views/api/bulk/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def bulk_annotation(request):
# Use the authority from the authenticated client to ensure the user
# is limited to items they have permission to request
authority=request.identity.auth_client.authority,
**query_filter,
audience=query_filter["audience"],
updated=query_filter["updated"],
limit=query_filter["limit"],
)

except BadDateFilter as err:
Expand Down
2 changes: 1 addition & 1 deletion h/views/api/bulk/annotation_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"audience": {"$ref": "#/$defs/userFilter"},
"updated": {"$ref": "#/$defs/dateFilter"}
},
"required": ["limit", "audience"],
"required": ["limit", "audience", "updated"],
"additionalProperties": false
},

Expand Down
4 changes: 3 additions & 1 deletion tests/h/views/api/bulk/annotation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def test_it(

bulk_annotation_service.annotation_search.assert_called_once_with(
authority=pyramid_request.identity.auth_client.authority,
**valid_request["filter"],
audience=valid_request["filter"]["audience"],
limit=valid_request["filter"]["limit"],
updated=valid_request["filter"]["updated"],
)

return_data = [
Expand Down

0 comments on commit 08b466c

Please sign in to comment.