summaryrefslogtreecommitdiff
path: root/__main__.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-09-01 00:58:59 +0200
committerBotond Hende <nettingman@gmail.com>2024-09-01 00:58:59 +0200
commitf55028d8d7d703f348190598d2fce93103070d17 (patch)
tree68fd302176de71220b63e38462871d99668a20a5 /__main__.py
parente66fb136c8fd10fe8bafb273c938a3d332d997ba (diff)
ship customization: renaming
Diffstat (limited to '__main__.py')
-rw-r--r--__main__.py6
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)