we are so back

This commit is contained in:
2025-05-05 14:05:12 -04:00
parent 11aa4cda16
commit 5c85411c69
20 changed files with 2417 additions and 33 deletions

View File

@ -66,8 +66,8 @@ async def lifespan(app: FastAPI):
logger.info("Most recent prices updated successfully")
# Create default customer, vendor, and marketplace
inv_data_init = await data_init_service.initialize_inventory_data(db)
logger.info(f"Inventory data initialization results: {inv_data_init}")
#inv_data_init = await data_init_service.initialize_inventory_data(db)
#logger.info(f"Inventory data initialization results: {inv_data_init}")
# Start the scheduler
scheduler = service_manager.get_service('scheduler')
await scheduler.refresh_tcgplayer_inventory_table(db)
@ -115,6 +115,46 @@ async def read_app_js():
raise HTTPException(status_code=404, detail="App.js file not found")
return FileResponse(js_path)
# Serve manabox.html
@app.get("/manabox.html")
async def read_manabox_html():
html_path = Path('app/static/manabox.html')
if not html_path.exists():
raise HTTPException(status_code=404, detail="Manabox.html file not found")
return FileResponse(html_path)
# Serve manabox.js
@app.get("/manabox.js")
async def read_manabox_js():
js_path = Path('app/static/manabox.js')
if not js_path.exists():
raise HTTPException(status_code=404, detail="Manabox.js file not found")
return FileResponse(js_path)
# serve transactions.html
@app.get("/transactions.html")
async def read_transactions_html():
html_path = Path('app/static/transactions.html')
if not html_path.exists():
raise HTTPException(status_code=404, detail="Transaction.html file not found")
return FileResponse(html_path)
# serve transactions.js
@app.get("/transactions.js")
async def read_transactions_js():
js_path = Path('app/static/transactions.js')
if not js_path.exists():
raise HTTPException(status_code=404, detail="Transaction.js file not found")
return FileResponse(js_path)
# serve styles.css
@app.get("/styles.css")
async def read_styles_css():
css_path = Path('app/static/styles.css')
if not css_path.exists():
raise HTTPException(status_code=404, detail="Styles.css file not found")
return FileResponse(css_path)
# Configure CORS with specific origins in production
app.add_middleware(
CORSMiddleware,