partial deployment

This commit is contained in:
2025-09-28 22:53:09 -04:00
parent 9bb763a053
commit 0acfd16d96
13 changed files with 201 additions and 7 deletions

View File

@@ -2,6 +2,9 @@
from fastapi import FastAPI
from sys import argv
from exceptions import bad_key
from repos.api_keys import ApiKeyRepo
from routers.prefixes import prefix_router
from routers.tickets import ticket_router
@@ -16,6 +19,12 @@ if argv[1] == "run":
else:
app = FastAPI(title="TAM3 API Server")
@app.get("/api/")
def remote_check(api_key: str = ""):
if not ApiKeyRepo().check_api(api_key):
return {"status": "healthy", "auth": False, "whoami": "TAM3 Server"}
return {"status": "healthy", "auth": True, "whoami": "TAM3 Server"}
app.include_router(prefix_router)
app.include_router(ticket_router)
app.include_router(basket_router)