From 1638f40eccc4a1321ee1bf19e3756157b6c965e1 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Mon, 2 Sep 2024 00:21:13 +0200 Subject: refactored code, use get_ship dependency for ship related calls --- __main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '__main__.py') 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( -- cgit v1.2.3-70-g09d2