fix: send boolean response

This commit is contained in:
karishmas6
2024-10-26 19:07:55 +05:30
parent 487b474a63
commit 034e9c2f71

View File

@@ -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' });
}
});