Return a boolean directly from API endpoint for project locked status

This commit is contained in:
grossmj committed 2022-09-03 23:08:13 +02:00
1 parent 27debfff8d
commit 2976e220dc
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -396,12 +396,12 @@ async def duplicate_project(
@router.get("/{project_id}/locked")
async def locked_project(project: Project = Depends(dep_project)) -> dict:
async def locked_project(project: Project = Depends(dep_project)) -> bool:
"""
Returns whether a project is locked or not
"""
return {"result": project.locked}
return project.locked
@router.post("/{project_id}/lock", status_code=status.HTTP_204_NO_CONTENT)