diff options
author | Botond Hende <nettingman@gmail.com> | 2024-09-02 00:30:16 +0200 |
---|---|---|
committer | Botond Hende <nettingman@gmail.com> | 2024-09-02 00:30:16 +0200 |
commit | 5f67692c2424ce54c8dd754ef87d8d753759700e (patch) | |
tree | eec7f1b3c626f2bbc4a971214e0d75eab70b6b84 /apirouters/tasks.py | |
parent | 1638f40eccc4a1321ee1bf19e3756157b6c965e1 (diff) |
renamed/refactored code
Diffstat (limited to 'apirouters/tasks.py')
-rw-r--r-- | apirouters/tasks.py | 5 |
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()) |