feat: Asset Catalog system, PostGIS integration and RobotScout V1
This commit is contained in:
@@ -2,7 +2,8 @@ import os
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from app.api.v1.api import api_router # Ez már tartalmaz mindent (auth, services, stb.)
|
||||
from starlette.middleware.sessions import SessionMiddleware # ÚJ
|
||||
from app.api.v1.api import api_router
|
||||
from app.core.config import settings
|
||||
|
||||
os.makedirs("static/previews", exist_ok=True)
|
||||
@@ -14,12 +15,19 @@ app = FastAPI(
|
||||
docs_url="/docs"
|
||||
)
|
||||
|
||||
# --- SESSION MIDDLEWARE (Google Authhoz kötelező) ---
|
||||
app.add_middleware(
|
||||
SessionMiddleware,
|
||||
secret_key=settings.SECRET_KEY
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=[
|
||||
"http://192.168.100.10:3001",
|
||||
"http://localhost:3001",
|
||||
"https://dev.profibot.hu"
|
||||
"https://dev.profibot.hu",
|
||||
"https://app.profibot.hu"
|
||||
],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
@@ -27,8 +35,6 @@ app.add_middleware(
|
||||
)
|
||||
|
||||
app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||
|
||||
# CSAK EZT AZ EGYET KELL BEKÖTNI:
|
||||
app.include_router(api_router, prefix="/api/v1")
|
||||
|
||||
@app.get("/")
|
||||
@@ -36,5 +42,5 @@ async def root():
|
||||
return {
|
||||
"status": "online",
|
||||
"message": "Service Finder Master System v2.0",
|
||||
"features": ["Document Engine", "Asset Vault", "Org Onboarding", "Service Hunt"]
|
||||
"features": ["Google Auth Enabled", "Asset Vault", "Org Onboarding"]
|
||||
}
|
||||
Reference in New Issue
Block a user