feat: post config route

This commit is contained in:
karishmas6
2024-10-01 15:28:37 +05:30
parent 38d053f4af
commit 9a6f3a1b39

View File

@@ -0,0 +1,14 @@
import { Router, Request, Response } from 'express';
export const router = Router();
router.post('/config', async (req: Request, res: Response) => {
const { proxyConfig } = req.body;
try {
if (!proxyConfig) {
return res.status(400).send('Proxy configuration is required');
}
console.log(proxyConfig);
} catch (error: any) {
res.status(500).send(`Could not send proxy configuration - ${error.message}`)
}
})