diff --git a/src/api/proxy.ts b/src/api/proxy.ts index d60ff726..55cffacd 100644 --- a/src/api/proxy.ts +++ b/src/api/proxy.ts @@ -40,4 +40,18 @@ export const testProxyConfig = async (): Promise<{ success: boolean }> => { console.log(error); return { success: false }; } +} + +export const deleteProxyConfig = async (): Promise => { + try { + const response = await axios.delete(`http://localhost:8080/proxy/config`); + if (response.status === 200) { + return response.data; + } else { + throw new Error(`Failed to delete proxy configuration. Try again.`); + } + } catch (error: any) { + console.log(error); + return false; + } } \ No newline at end of file