Reaperxxxx commited on
Commit
c3f7d27
·
verified ·
1 Parent(s): 0b9970d

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +7 -0
index.js CHANGED
@@ -67,6 +67,13 @@ app.get('/tools', (req, res) => {
67
  res.json(checkTools());
68
  });
69
 
 
 
 
 
 
 
 
70
  // GET /debug — APK diagnostics
71
  app.get('/debug', (req, res) => {
72
  const exists = fs.existsSync(BUNDLED_APK);
 
67
  res.json(checkTools());
68
  });
69
 
70
+ // GET /session/:token — check if a session is still alive
71
+ app.get('/session/:token', (req, res) => {
72
+ const sessionDir = path.join(os.tmpdir(), req.params.token);
73
+ const alive = fs.existsSync(path.join(sessionDir, 'original.apk'));
74
+ res.json({ alive });
75
+ });
76
+
77
  // GET /debug — APK diagnostics
78
  app.get('/debug', (req, res) => {
79
  const exists = fs.existsSync(BUNDLED_APK);