diff options
author | Botond Hende <nettingman@gmail.com> | 2024-09-02 00:21:13 +0200 |
---|---|---|
committer | Botond Hende <nettingman@gmail.com> | 2024-09-02 00:21:13 +0200 |
commit | 1638f40eccc4a1321ee1bf19e3756157b6c965e1 (patch) | |
tree | 99209de68ebcd4f42cafcdf14e563d7916d69e00 /__main__.py | |
parent | 3a390ff218903b8665a99f94d7f3a65357b6e96d (diff) |
refactored code, use get_ship dependency for ship related calls
Diffstat (limited to '__main__.py')
-rw-r--r-- | __main__.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/__main__.py b/__main__.py index 5372651..662d7f3 100644 --- a/__main__.py +++ b/__main__.py @@ -1,15 +1,13 @@ from contextlib import asynccontextmanager -from typing import Annotated -from fastapi import FastAPI, Depends +from fastapi import FastAPI from .apirouters import agents, tasks, customize_ship -from .apirouters import tasks, customize_ship from .modules.database import cursor, conn @asynccontextmanager -async def lifespan(app: FastAPI): +async def lifespan(application: 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( |