Skip to content

Commit

Permalink
Update docs successful status code for deletion endpoints (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedingber committed Aug 13, 2020
1 parent 6abf437 commit 1d48e91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mlrun/api/api/endpoints/runtimes.py
Expand Up @@ -38,7 +38,7 @@ def get_runtime(kind: str, label_selector: str = None):
}


@router.delete("/runtimes")
@router.delete("/runtimes", status_code=HTTPStatus.NO_CONTENT.value)
def delete_runtimes(
label_selector: str = None,
force: bool = False,
Expand All @@ -53,7 +53,7 @@ def delete_runtimes(
return Response(status_code=HTTPStatus.NO_CONTENT.value)


@router.delete("/runtimes/{kind}")
@router.delete("/runtimes/{kind}", status_code=HTTPStatus.NO_CONTENT.value)
def delete_runtime(
kind: str,
label_selector: str = None,
Expand All @@ -73,7 +73,7 @@ def delete_runtime(


# FIXME: find a more REST-y path
@router.delete("/runtimes/{kind}/{object_id}")
@router.delete("/runtimes/{kind}/{object_id}", status_code=HTTPStatus.NO_CONTENT.value)
def delete_runtime_object(
kind: str,
object_id: str,
Expand Down
4 changes: 3 additions & 1 deletion mlrun/api/api/endpoints/schedules.py
Expand Up @@ -45,7 +45,9 @@ def get_schedule(
return get_scheduler().get_schedule(db_session, project, name)


@router.delete("/projects/{project}/schedules/{name}")
@router.delete(
"/projects/{project}/schedules/{name}", status_code=HTTPStatus.NO_CONTENT.value
)
def delete_schedule(
project: str, name: str, db_session: Session = Depends(deps.get_db_session),
):
Expand Down

0 comments on commit 1d48e91

Please sign in to comment.