[V0.2] WORKING Working calendar and AI with full frontend.
This commit is contained in:
@@ -7,6 +7,12 @@ from core.database import get_engine, Base
|
||||
from modules import router
|
||||
import logging
|
||||
|
||||
|
||||
# import all models to ensure they are registered before create_all
|
||||
from modules.calendar.models import CalendarEvent
|
||||
from modules.auth.models import User
|
||||
|
||||
|
||||
logging.getLogger('passlib').setLevel(logging.ERROR) # fix bc package logging is broken
|
||||
|
||||
# Create DB tables (remove in production; use migrations instead)
|
||||
@@ -29,7 +35,11 @@ app.include_router(router)
|
||||
# CORS
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["http://localhost:8081"],
|
||||
allow_origins=[
|
||||
"http://localhost:8081", # Keep for web testing if needed
|
||||
"http://192.168.1.9:8081", # Add your mobile device/emulator origin (adjust port if needed)
|
||||
# Add other origins if necessary, e.g., production frontend URL
|
||||
],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"]
|
||||
|
||||
Reference in New Issue
Block a user