dodd869 commited on
Commit
f6094e4
·
verified ·
1 Parent(s): 284187a

Update srv.js

Browse files
Files changed (1) hide show
  1. srv.js +2 -2
srv.js CHANGED
@@ -19,8 +19,8 @@ async function fetchKey(game) {
19
  const genRes = await fetch(`https://web.aachann.my.id/Get-key/genkey.php?data=${data}`);
20
  const genTxt = await genRes.text();
21
  const k = genTxt.match(/id="gameKey"[^>]*>([^<]+)<\/p>/);
22
- if (!k) throw new Error('key not found in response');
23
- return k[1]?.trim();
24
  }
25
 
26
  app.get('/key', async (req, res) => {
 
19
  const genRes = await fetch(`https://web.aachann.my.id/Get-key/genkey.php?data=${data}`);
20
  const genTxt = await genRes.text();
21
  const k = genTxt.match(/id="gameKey"[^>]*>([^<]+)<\/p>/);
22
+ //if (!k) throw new Error('key not found in response');
23
+ return k[1]?.trim() || `https://web.aachann.my.id/Get-key/genkey.php?data=${data}`;
24
  }
25
 
26
  app.get('/key', async (req, res) => {