Spaces:
Running
Running
Update app.js
Browse files
app.js
CHANGED
|
@@ -367,7 +367,13 @@ app.post('/process', async (req, res) => {
|
|
| 367 |
}
|
| 368 |
|
| 369 |
const cleanText = aiResult.text.replace(/<[^>]+>[\s\S]*?<\/[^>]+>/g, '').trim();
|
| 370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 371 |
} catch (e) { res.status(500).json({ error: "Processing Error" }); }
|
| 372 |
});
|
| 373 |
|
|
|
|
| 367 |
}
|
| 368 |
|
| 369 |
const cleanText = aiResult.text.replace(/<[^>]+>[\s\S]*?<\/[^>]+>/g, '').trim();
|
| 370 |
+
|
| 371 |
+
const isFrozen = await StateManager.isFrozen(projectId);
|
| 372 |
+
if (isFrozen) {
|
| 373 |
+
await StateManager.setFrozen(projectId, true);
|
| 374 |
+
};
|
| 375 |
+
|
| 376 |
+
res.json({ text: cleanText, should_reload: flags.shouldReload });
|
| 377 |
} catch (e) { res.status(500).json({ error: "Processing Error" }); }
|
| 378 |
});
|
| 379 |
|