From 034e9c2f719b19cb0027667f5473f4459a0989f1 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 26 Oct 2024 19:07:55 +0530 Subject: [PATCH] fix: send boolean response --- server/src/routes/proxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/routes/proxy.ts b/server/src/routes/proxy.ts index ea1565a1..7ab54526 100644 --- a/server/src/routes/proxy.ts +++ b/server/src/routes/proxy.ts @@ -48,9 +48,10 @@ router.post('/config', requireSignIn, async (req: AuthenticatedRequest, res: Res proxy_password: encryptedProxyPassword, }); - res.status(200).send('Proxy configuration saved successfully'); + res.status(200).json({ ok: true }); } catch (error: any) { - res.status(500).send(`Could not save proxy configuration - ${error.message}`); + console.log(`Could not save proxy configuration - ${error}`); + res.status(500).json({ ok: false, error: 'Could not save proxy configuration' }); } });