feat: turn into a pwa
This commit is contained in:
20
app/main.py
20
app/main.py
@@ -36,6 +36,26 @@ async def worker_js():
|
||||
return FileResponse(STATIC_DIR / "worker.js", media_type="application/javascript")
|
||||
|
||||
|
||||
@app.get("/sw.js")
|
||||
async def sw_js():
|
||||
return FileResponse(STATIC_DIR / "sw.js", media_type="application/javascript")
|
||||
|
||||
|
||||
@app.get("/manifest.json")
|
||||
async def manifest():
|
||||
return FileResponse(STATIC_DIR / "manifest.json", media_type="application/manifest+json")
|
||||
|
||||
|
||||
@app.get("/icon.svg")
|
||||
async def icon():
|
||||
return FileResponse(STATIC_DIR / "icon.svg", media_type="image/svg+xml")
|
||||
|
||||
|
||||
@app.get("/icon-maskable.svg")
|
||||
async def icon_maskable():
|
||||
return FileResponse(STATIC_DIR / "icon-maskable.svg", media_type="image/svg+xml")
|
||||
|
||||
|
||||
@app.post("/extract-audio")
|
||||
async def extract_audio(body: ExtractAudioRequest, background_tasks: BackgroundTasks):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user