Filter and tokens update

This commit is contained in:
2026-06-13 12:28:58 -05:00
parent 1c4659c1ae
commit 593a6756f6
6 changed files with 338 additions and 154 deletions
+9 -1
View File
@@ -82,6 +82,14 @@ app.include_router(cards_router, dependencies=[Depends(auth)])
app.include_router(public_router) # no auth — TTS app fetches card images directly
@app.get("/decks/{slug}/tts.json")
async def tts_json(slug: str):
path = OUTPUTS / slug / "deck.tts.json"
if not path.exists():
raise HTTPException(404, "TTS file not found")
return FileResponse(path, media_type="application/json")
@app.get("/")
async def index(_=Depends(auth)):
return FileResponse("static/index.html")
@@ -92,4 +100,4 @@ async def card_back():
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=PORT)
uvicorn.run(app, host="0.0.0.0", port=PORT)