From a31eea7c5d43cd44fbab6207bea1059b1ef501fb Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Wed, 7 Jun 2023 15:41:47 -0700 Subject: [PATCH] Refcator API naming scheme, cleaner --- crowdtls/{v1/api.py => apis/v1.py} | 0 crowdtls/{api.py => webserver.py} | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename crowdtls/{v1/api.py => apis/v1.py} (100%) rename crowdtls/{api.py => webserver.py} (85%) diff --git a/crowdtls/v1/api.py b/crowdtls/apis/v1.py similarity index 100% rename from crowdtls/v1/api.py rename to crowdtls/apis/v1.py diff --git a/crowdtls/api.py b/crowdtls/webserver.py similarity index 85% rename from crowdtls/api.py rename to crowdtls/webserver.py index b15109a..369d6f6 100644 --- a/crowdtls/api.py +++ b/crowdtls/webserver.py @@ -1,13 +1,13 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware +from crowdtls.apis.v1 import app as api_v1 from crowdtls.db import create_db_and_tables from crowdtls.logs import logger -from crowdtls.v1.api import app as api_v1_app app = FastAPI() app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["POST"], allow_headers=["*"]) -app.include_router(api_v1_app, prefix="/api/v1") +app.include_router(api_v1, prefix="/api/v1") @app.on_event("startup")