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
2877cc5d6c
commit
8ce40503d8
3 changed files with 5 additions and 4 deletions
|
|
@ -47,7 +47,6 @@ ELEVENLABS_API_KEY=
|
||||||
PORT=3000
|
PORT=3000
|
||||||
APP_URL=https://your-domain.com
|
APP_URL=https://your-domain.com
|
||||||
JWT_SECRET=generate-a-random-64-char-string-here
|
JWT_SECRET=generate-a-random-64-char-string-here
|
||||||
SESSION_SECRET=generate-another-random-string-here
|
|
||||||
|
|
||||||
# Email (for verification & password reset)
|
# Email (for verification & password reset)
|
||||||
SMTP_HOST=smtp.gmail.com
|
SMTP_HOST=smtp.gmail.com
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
pediatric-scribe:
|
pediatric-scribe:
|
||||||
image: danielonyejesi/pediatric-ai-scribe-v3:v7
|
image: danielonyejesi/pediatric-ai-scribe-v3:v8
|
||||||
ports:
|
ports:
|
||||||
- "3552:3000"
|
- "3552:3000"
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,10 @@ router.post('/nextcloud/export', authMiddleware, async function(req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/nextcloud/disconnect', 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]);
|
try {
|
||||||
res.json({ success: true });
|
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;
|
module.exports = router;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue