diff options
Diffstat (limited to 'apirouters')
-rw-r--r-- | apirouters/auth.py (renamed from apirouters/agents.py) | 0 | ||||
-rw-r--r-- | apirouters/customize_ship.py | 2 | ||||
-rw-r--r-- | apirouters/tasks.py | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/apirouters/agents.py b/apirouters/auth.py index 49d3740..49d3740 100644 --- a/apirouters/agents.py +++ b/apirouters/auth.py diff --git a/apirouters/customize_ship.py b/apirouters/customize_ship.py index ca3ef83..5f0666e 100644 --- a/apirouters/customize_ship.py +++ b/apirouters/customize_ship.py @@ -13,7 +13,7 @@ class RenameBody(BaseModel): @router.post("/customize_ship/{ship_symbol}/rename") -async def rename(ship_symbol: str, rename_body: RenameBody, ship: Annotated[Ship, Depends(ships.get_ship)]): +async def rename(rename_body: RenameBody, ship: Annotated[Ship, Depends(ships.get_ship)]): ship.rename(rename_body.name) return ship.get_data() 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()) |