dodd869 commited on
Commit
cc220a3
·
verified ·
1 Parent(s): 24d24c7

Update srv.js

Browse files
Files changed (1) hide show
  1. srv.js +1 -1
srv.js CHANGED
@@ -40,7 +40,7 @@ async function fetchKey(game) {
40
  const genTxt = genRes.data;
41
  const k = genTxt.match(/id="gameKey"[^>]*>([^<]+)<\/p>/);
42
  //if (!k) throw new Error('key not found in response');
43
- return k[1]?.trim();
44
  }
45
 
46
  app.get('/key', async (req, res) => {
 
40
  const genTxt = genRes.data;
41
  const k = genTxt.match(/id="gameKey"[^>]*>([^<]+)<\/p>/);
42
  //if (!k) throw new Error('key not found in response');
43
+ return k[1]?.trim() || k[1] || k || 'error'
44
  }
45
 
46
  app.get('/key', async (req, res) => {