diff options
Diffstat (limited to '__main__.py')
-rw-r--r-- | __main__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/__main__.py b/__main__.py index 36cbc28..5372651 100644 --- a/__main__.py +++ b/__main__.py @@ -3,7 +3,8 @@ from typing import Annotated from fastapi import FastAPI, Depends -from .apirouters import agents, tasks +from .apirouters import agents, tasks, customize_ship +from .apirouters import tasks, customize_ship from .modules.database import cursor, conn @@ -12,7 +13,7 @@ async def lifespan(app: FastAPI): cursor.execute( "CREATE TABLE IF NOT EXISTS agents(primary_key INTEGER PRIMARY KEY, callsign TEXT NOT NULL UNIQUE, token TEXT NOT NULL)") cursor.execute( - "CREATE TABLE IF NOT EXISTS ships(primary_key INTEGER PRIMARY KEY, symbol TEXT NOT NULL UNIQUE, task TEXT NOT NULL, params TEXT)") + "CREATE TABLE IF NOT EXISTS ships(primary_key INTEGER PRIMARY KEY, symbol TEXT NOT NULL UNIQUE, task TEXT NOT NULL, params TEXT, name TEXT)") conn.commit() agents.load_agents_from_database() yield @@ -21,4 +22,5 @@ async def lifespan(app: FastAPI): app = FastAPI(lifespan=lifespan) app.include_router(agents.router) app.include_router(tasks.router) +app.include_router(customize_ship.router) |