IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Verified Commit 29a4a12e authored by Emi Simpson's avatar Emi Simpson
Browse files

[api] Don't fail when no JSON is provided to the delete project endpoint

parent cff133d9
Pipeline #1078 failed with stage
in 49 seconds
......@@ -462,10 +462,10 @@ def edit_project(r: ApiJsonRequest, get_user: GetUser, pid: UncheckedPID) -> Que
@bp.delete('/project/<int:pid>')
@make_response
@json_request(handle_json_parse_error)
@query_args_request
@authenticate
@after_running_execute_queries(is_r)
def delete_project(_: ApiJsonRequest, get_user: GetUser, pid: UncheckedPID) -> Query[R[Success], R[NoPermissionError | ExpiredSessionError]]:
def delete_project(_: ApiGetRequest, get_user: GetUser, pid: UncheckedPID) -> Query[R[Success], R[NoPermissionError | ExpiredSessionError]]:
return queries.BoundQuery(
# Validate the user's session
get_user,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment