Skip to content

Commit

Permalink
fix(backend): Revert non-async routes that are changed to async (#8734)
Browse files Browse the repository at this point in the history
  • Loading branch information
majdyz authored Nov 21, 2024
1 parent c14ab0c commit 6954f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions autogpt_platform/backend/backend/server/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ def run(self):
async def test_execute_graph(
graph_id: str, node_input: dict[typing.Any, typing.Any], user_id: str
):
return await backend.server.routers.v1.execute_graph(
graph_id, node_input, user_id
)
return backend.server.routers.v1.execute_graph(graph_id, node_input, user_id)

@staticmethod
async def test_create_graph(
Expand Down
6 changes: 3 additions & 3 deletions autogpt_platform/backend/backend/server/routers/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async def set_graph_active_version(
tags=["graphs"],
dependencies=[Depends(auth_middleware)],
)
async def execute_graph(
def execute_graph(
graph_id: str,
node_input: dict[Any, Any],
user_id: Annotated[str, Depends(get_user_id)],
Expand Down Expand Up @@ -481,7 +481,7 @@ async def create_schedule(
tags=["schedules"],
dependencies=[Depends(auth_middleware)],
)
async def delete_schedule(
def delete_schedule(
schedule_id: str,
user_id: Annotated[str, Depends(get_user_id)],
) -> dict[Any, Any]:
Expand All @@ -494,7 +494,7 @@ async def delete_schedule(
tags=["schedules"],
dependencies=[Depends(auth_middleware)],
)
async def get_execution_schedules(
def get_execution_schedules(
user_id: Annotated[str, Depends(get_user_id)],
graph_id: str | None = None,
) -> list[scheduler.JobInfo]:
Expand Down

0 comments on commit 6954f4e

Please sign in to comment.