added duplicate check and database
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import os
|
||||
from fastapi import FastAPI, HTTPException, UploadFile, File
|
||||
from app.database import init_db
|
||||
from app.config import settings
|
||||
from app.tasks.upload_to_s3 import upload_to_s3
|
||||
from app.tasks.upload_to_dropbox import upload_to_dropbox
|
||||
@@ -12,6 +13,10 @@ from app.frontend import router as frontend_router
|
||||
|
||||
app = FastAPI(title="Document Processing API")
|
||||
|
||||
@app.on_event("startup")
|
||||
def on_startup():
|
||||
init_db() # Create tables if they don't exist
|
||||
|
||||
@app.get("/")
|
||||
def root():
|
||||
return {"message": "Document Processing API"}
|
||||
|
||||
Reference in New Issue
Block a user