Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Improve strategy code redability
Andrew Bastin730018b45ff8
diff --git a/functions/strategies/AxiosStrategy.js b/functions/strategies/AxiosStrategy.jsindex 885ed2f1e..3c237ea6c 100644--- a/functions/strategies/AxiosStrategy.js+++ b/functions/strategies/AxiosStrategy.js@@ -15,8 +15,9 @@ const axiosWithoutProxy = async (req, _store) => {};const axiosStrategy = (req, store) => {- if (store.state.postwoman.settings.PROXY_ENABLED)+ if (store.state.postwoman.settings.PROXY_ENABLED) {return axiosWithProxy(req, store);+ }else return axiosWithoutProxy(req, store);}diff --git a/functions/strategies/FirefoxStrategy.js b/functions/strategies/FirefoxStrategy.jsindex ecd7b133a..cfe47d059 100644--- a/functions/strategies/FirefoxStrategy.js+++ b/functions/strategies/FirefoxStrategy.js@@ -30,8 +30,9 @@ const firefoxWithoutProxy = (req, _store) => new Promise((resolve, reject) => {});const firefoxStrategy = (req, store) => {- if (store.state.postwoman.settings.PROXY_ENABLED)+ if (store.state.postwoman.settings.PROXY_ENABLED) {return firefoxWithProxy(req, store);+ }else return firefoxWithoutProxy(req, store);}