Spaces:
Running
Running
Upload static/app_v2.js with huggingface_hub
Browse files- static/app_v2.js +5 -2
static/app_v2.js
CHANGED
|
@@ -361,9 +361,12 @@ async function openHighlightFeed(league,idx,directUrl){
|
|
| 361 |
const el=document.getElementById('view-tiktok');
|
| 362 |
el.innerHTML='<div class="loading">膼ang t岷...</div>';
|
| 363 |
let articles=(_hlLeagueData||{})[league]||[];
|
| 364 |
-
// For world-cup league, use the new WC highlights API data
|
| 365 |
if(!articles.length && league==='world-cup'){
|
| 366 |
-
try{
|
|
|
|
|
|
|
|
|
|
| 367 |
}
|
| 368 |
if(!articles.length){try{articles=await fetch('/api/highlights/'+league).then(r=>r.json())}catch(e){articles=[]}}
|
| 369 |
if(!articles.length){el.innerHTML='<div class="loading">Kh么ng c贸 video</div>';return}
|
|
|
|
| 361 |
const el=document.getElementById('view-tiktok');
|
| 362 |
el.innerHTML='<div class="loading">膼ang t岷...</div>';
|
| 363 |
let articles=(_hlLeagueData||{})[league]||[];
|
| 364 |
+
// For world-cup league, use the new WC highlights API data
|
| 365 |
if(!articles.length && league==='world-cup'){
|
| 366 |
+
try{
|
| 367 |
+
const wcRaw = await fetch('/api/wc2026/highlights').then(r=>r.json());
|
| 368 |
+
articles = Array.isArray(wcRaw)?wcRaw:(wcRaw && wcRaw.data ? wcRaw.data : []);
|
| 369 |
+
}catch(e){articles=[]}
|
| 370 |
}
|
| 371 |
if(!articles.length){try{articles=await fetch('/api/highlights/'+league).then(r=>r.json())}catch(e){articles=[]}}
|
| 372 |
if(!articles.length){el.innerHTML='<div class="loading">Kh么ng c贸 video</div>';return}
|