Spaces:
Running
Running
Serve index_v3.html instead of inline index.html
Browse files- app_v2_entry.py +2 -1
app_v2_entry.py
CHANGED
|
@@ -423,8 +423,9 @@ def _get_hot_topics():
|
|
| 423 |
@app.get('/api/hot_topics')
|
| 424 |
def api_hot_topics():return JSONResponse({'topics':_get_hot_topics()})
|
| 425 |
@app.get('/')
|
|
|
|
| 426 |
async def serve_index():
|
| 427 |
-
p=os.path.join(STATIC_DIR,'
|
| 428 |
if os.path.exists(p):return FileResponse(p,media_type='text/html')
|
| 429 |
return HTMLResponse('<h1>VNEWS</h1>')
|
| 430 |
@app.get('/api/hashtag/sources')
|
|
|
|
| 423 |
@app.get('/api/hot_topics')
|
| 424 |
def api_hot_topics():return JSONResponse({'topics':_get_hot_topics()})
|
| 425 |
@app.get('/')
|
| 426 |
+
# Serve v3
|
| 427 |
async def serve_index():
|
| 428 |
+
p=os.path.join(STATIC_DIR,'index_v3.html')
|
| 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')
|