Reaperxxxx commited on
Commit
bb572e1
·
verified ·
1 Parent(s): a4d4bce

Update docs.html

Browse files
Files changed (1) hide show
  1. docs.html +6 -18
docs.html CHANGED
@@ -2504,27 +2504,15 @@ window.addEventListener('DOMContentLoaded', loadUserTheme);
2504
  }
2505
 
2506
  // Fetch user info
2507
- let iconURL = 'https://files.catbox.moe/t8x1r8.png'; // default fallback
2508
-
2509
- try {
2510
- const markRes = await fetch(`https://reaperxxxx-testldb.hf.space/user/${userId}/mark`);
2511
- const markData = await markRes.json();
2512
-
2513
- if (markData.status && markData.url) {
2514
- iconURL = markData.url; // use the fetched mark URL
2515
- }
2516
- } catch (err) {
2517
- console.error('Failed to fetch user mark, using fallback:', err);
2518
- }
2519
-
2520
- // Now iconURL is either the user's mark URL or the fallback
2521
- const infoRes = await fetch(`https://reaperxxxx-testldb.hf.space/user/${userId}/info`);
2522
  const infoData = await infoRes.json();
2523
 
2524
- const userInfo = (infoData.status ? infoData.groups[0] : {}) || {};
 
2525
 
2526
- const fullName = userInfo.fullName || 'N/A';
2527
- const username = userInfo.username || 'N/A';
 
2528
 
2529
  // iconURL is already set above
2530
 
 
2504
  }
2505
 
2506
  // Fetch user info
2507
+ const infoRes = await fetch(`https://reaperxxxx-testldb.hf.space/user/${userId}/info`);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2508
  const infoData = await infoRes.json();
2509
 
2510
+ if (infoData.status) {
2511
+ const userInfo = infoData.groups[0] || {};
2512
 
2513
+ const fullName = userInfo.fullName || 'N/A';
2514
+ const username = userInfo.username || 'N/A';
2515
+ const iconURL = (await (async () => { try { const res = await fetch(`https://reaperxxxx-testldb.hf.space/user/${userId}/mark`); const data = await res.json(); return data.status && data.url ? data.url : 'https://files.catbox.moe/t8x1r8.png'; } catch { return 'https://files.catbox.moe/t8x1r8.png'; } })());
2516
 
2517
  // iconURL is already set above
2518