Spaces:
Runtime error
Runtime error
Update index.js
Browse files
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);
|