Skip to content

Commit

Permalink
fixup! [a] Add support for POST to manifest endpoint (#5918)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Apr 1, 2024
1 parent 391cedb commit 81a4905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lambdas/service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ def get_summary():


def manifest_route(*, fetch: bool, method: str):
initiate = method in ['PUT', 'POST']
initiate = method in {'PUT', 'POST'}
return app.route(
# The path parameter could be a token *or* an object key, but we don't
# want to complicate the API with this detail
Expand Down Expand Up @@ -1549,7 +1549,7 @@ def fetch_file_manifest_with_token(token: str):

def _file_manifest(fetch: bool, token_or_key: Optional[str] = None):
request = app.current_request
require(request.method != 'POST' or request.raw_body.decode() == '',
require(request.method != 'POST' or request.raw_body == b'',
'The body must be empty for a POST request to this endpoint.')
query_params = request.query_params or {}
_hoist_parameters(query_params, request)
Expand Down

0 comments on commit 81a4905

Please sign in to comment.