Skip to content

Commit

Permalink
♻️ Add status code 201 to create app endpoint (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejsdev authored Aug 20, 2024
1 parent f754769 commit 7ea67e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/app/api/routes/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def read_apps(
return AppsPublic(data=apps, count=count)


@router.post("/", response_model=AppPublic)
@router.post("/", response_model=AppPublic, status_code=201)
def create_app(
session: SessionDep, current_user: CurrentUser, app_in: AppCreate
) -> Any:
Expand Down
4 changes: 2 additions & 2 deletions backend/app/tests/api/routes/test_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_create_app_admin(client: TestClient, db: Session) -> None:
json=app_in,
)

assert response.status_code == 200
assert response.status_code == 201
data = response.json()
assert data["id"]
assert data["name"] == app_in["name"]
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_create_app_member(client: TestClient, db: Session) -> None:
json=app_in,
)

assert response.status_code == 200
assert response.status_code == 201
data = response.json()
assert data["id"]
assert data["name"] == app_in["name"]
Expand Down

0 comments on commit 7ea67e2

Please sign in to comment.