Refcator API naming scheme, cleaner

This commit is contained in:
Darryl Nixon 2023-06-07 15:41:47 -07:00
parent 9febdde025
commit a31eea7c5d
2 changed files with 2 additions and 2 deletions

View file

@ -1,13 +1,13 @@
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware 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.db import create_db_and_tables
from crowdtls.logs import logger from crowdtls.logs import logger
from crowdtls.v1.api import app as api_v1_app
app = FastAPI() app = FastAPI()
app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["POST"], allow_headers=["*"]) 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") @app.on_event("startup")