"""
# Add the current user as a watcher
async with backend.db as session:
- build.add_watcher(current_user)
+ await build.add_watcher(current_user)
# Return 201
- return fastapi.Response(fastapi.status.HTTP_201_CREATED)
+ return fastapi.Response(status_code=fastapi.status.HTTP_201_CREATED)
@router.delete("/{uuid}/watchers")
async def remove_watcher(
"""
# Remove the current user as a watcher
async with backend.db as session:
- build.remove_watcher(current_user)
+ await build.remove_watcher(current_user)
# Return 204
- return fastapi.Response(fastapi.status.HTTP_204_NO_CONTENT)
+ return fastapi.Response(status_code=fastapi.status.HTTP_204_NO_CONTENT)
#
# Bugs