Fix missing error handling in nextcloud disconnect, update docker-compose to v8
- Add try-catch to /nextcloud/disconnect route (was crashing on DB errors) - Update docker-compose.yml image tag from v7 to v8 - Remove unused SESSION_SECRET from .env.example
This commit is contained in:
parent
6e1b6ca3d7
commit
9758ecbea2
3 changed files with 5 additions and 4 deletions
|
|
@ -47,7 +47,6 @@ ELEVENLABS_API_KEY=
|
|||
PORT=3000
|
||||
APP_URL=https://your-domain.com
|
||||
JWT_SECRET=generate-a-random-64-char-string-here
|
||||
SESSION_SECRET=generate-another-random-string-here
|
||||
|
||||
# Email (for verification & password reset)
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
pediatric-scribe:
|
||||
image: danielonyejesi/pediatric-ai-scribe-v3:v7
|
||||
image: danielonyejesi/pediatric-ai-scribe-v3:v8
|
||||
ports:
|
||||
- "3552:3000"
|
||||
env_file:
|
||||
|
|
|
|||
|
|
@ -60,8 +60,10 @@ router.post('/nextcloud/export', authMiddleware, async function(req, res) {
|
|||
});
|
||||
|
||||
router.post('/nextcloud/disconnect', authMiddleware, async function(req, res) {
|
||||
await db.run('UPDATE users SET nextcloud_url = NULL, nextcloud_user = NULL, nextcloud_token = NULL, nextcloud_folder = NULL WHERE id = ?', [req.user.id]);
|
||||
res.json({ success: true });
|
||||
try {
|
||||
await db.run('UPDATE users SET nextcloud_url = NULL, nextcloud_user = NULL, nextcloud_token = NULL, nextcloud_folder = NULL WHERE id = ?', [req.user.id]);
|
||||
res.json({ success: true });
|
||||
} catch (err) { res.status(500).json({ error: err.message }); }
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Reference in a new issue