summaryrefslogtreecommitdiff
path: root/apirouters/tasks.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-09-02 00:30:16 +0200
committerBotond Hende <nettingman@gmail.com>2024-09-02 00:30:16 +0200
commit5f67692c2424ce54c8dd754ef87d8d753759700e (patch)
treeeec7f1b3c626f2bbc4a971214e0d75eab70b6b84 /apirouters/tasks.py
parent1638f40eccc4a1321ee1bf19e3756157b6c965e1 (diff)
renamed/refactored code
Diffstat (limited to 'apirouters/tasks.py')
-rw-r--r--apirouters/tasks.py5
1 files changed, 3 insertions, 2 deletions
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())