chore: prttier

This commit is contained in:
karishmas6
2024-09-30 23:55:37 +05:30
parent 34247287e3
commit 40f77be584

View File

@@ -1,15 +1,15 @@
import { default as axios } from "axios";
export const sendProxyConfig = async (proxyConfig: {type: string, server: string, username:string, password: string}): Promise<boolean> => {
export const sendProxyConfig = async (proxyConfig: { type: string, server: string, username: string, password: string }): Promise<boolean> => {
try {
const response = await axios.post(`http://localhost:8080/proxy/config`, proxyConfig);
if (response.status === 200) {
return response.data;
} else {
throw new Error(`Failed to submit proxy configuration. Try again.`);
}
} catch(error: any) {
console.log(error);
return false;
const response = await axios.post(`http://localhost:8080/proxy/config`, proxyConfig);
if (response.status === 200) {
return response.data;
} else {
throw new Error(`Failed to submit proxy configuration. Try again.`);
}
} catch (error: any) {
console.log(error);
return false;
}
}
}