From f55028d8d7d703f348190598d2fce93103070d17 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Sun, 1 Sep 2024 00:58:59 +0200 Subject: ship customization: renaming --- __main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '__main__.py') 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) -- cgit v1.2.3-70-g09d2