From 5f67692c2424ce54c8dd754ef87d8d753759700e Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Mon, 2 Sep 2024 00:30:16 +0200 Subject: renamed/refactored code --- apirouters/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apirouters/tasks.py') diff --git a/apirouters/tasks.py b/apirouters/tasks.py index 684cf60..87fdb6e 100644 --- a/apirouters/tasks.py +++ b/apirouters/tasks.py @@ -2,16 +2,17 @@ from typing import Annotated from fastapi import APIRouter, Depends from pydantic import BaseModel -from . import agents +from . import auth from ..modules import ships from ..entities import task_types from ..entities.ship import Ship +from ..entities.agent import Agent router = APIRouter() @router.get("/tasks") -async def get_tasks(agent: Annotated[agents.Agent, Depends(agents.auth_agent)]): +async def get_tasks(agent: Annotated[Agent, Depends(auth.auth_agent)]): ret_list = [] for current_ship in agent.ships.values(): ret_list.append(current_ship.get_data()) -- cgit v1.2.3-70-g09d2