Spaces:
Running
Running
Serve index.html with tv_player.js
Browse files- app_v2_entry.py +3 -2
app_v2_entry.py
CHANGED
|
@@ -424,8 +424,9 @@ def _get_hot_topics():
|
|
| 424 |
def api_hot_topics():return JSONResponse({'topics':_get_hot_topics()})
|
| 425 |
@app.get('/')
|
| 426 |
async def serve_index():
|
| 427 |
-
|
| 428 |
-
|
|
|
|
| 429 |
return HTMLResponse('<h1>VNEWS</h1>')
|
| 430 |
@app.get('/api/hashtag/sources')
|
| 431 |
def _ht(topic:str=Query(...),page:int=Query(default=0)):
|
|
|
|
| 424 |
def api_hot_topics():return JSONResponse({'topics':_get_hot_topics()})
|
| 425 |
@app.get('/')
|
| 426 |
async def serve_index():
|
| 427 |
+
for name in ['index.html','index_v3.html','index_v2.html']:
|
| 428 |
+
p=os.path.join(STATIC_DIR,name)
|
| 429 |
+
if os.path.exists(p):return FileResponse(p,media_type='text/html')
|
| 430 |
return HTMLResponse('<h1>VNEWS</h1>')
|
| 431 |
@app.get('/api/hashtag/sources')
|
| 432 |
def _ht(topic:str=Query(...),page:int=Query(default=0)):
|