48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
from app.config import settings
|
|
from app.routers import auth, projects, articles, brand, contact, newsletter
|
|
from app.routers.simple_resources import (
|
|
services_router,
|
|
stats_router,
|
|
timeline_router,
|
|
why_us_router,
|
|
testimonials_router,
|
|
team_router,
|
|
faqs_router,
|
|
)
|
|
|
|
app = FastAPI(
|
|
title="Aramesh Plaza API",
|
|
description="بکاند سایت آرامش پلازا — مدیریت محتوا، فرم تماس و خبرنامه",
|
|
version="1.0.0",
|
|
)
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=settings.cors_origins_list,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(auth.router)
|
|
app.include_router(brand.router)
|
|
app.include_router(services_router)
|
|
app.include_router(projects.router)
|
|
app.include_router(stats_router)
|
|
app.include_router(timeline_router)
|
|
app.include_router(why_us_router)
|
|
app.include_router(testimonials_router)
|
|
app.include_router(team_router)
|
|
app.include_router(articles.router)
|
|
app.include_router(faqs_router)
|
|
app.include_router(contact.router)
|
|
app.include_router(newsletter.router)
|
|
|
|
|
|
@app.get("/", tags=["Health"])
|
|
def health_check():
|
|
return {"status": "ok", "message": "Aramesh Plaza API در حال اجراست"}
|