Update srv.js
Browse files
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) => {
|