From ca298e9bde4c3c8d049d7ac6ce1f9f7b3988f111 Mon Sep 17 00:00:00 2001 From: Bouncey Date: Fri, 15 Feb 2019 20:52:11 +0000 Subject: [PATCH] fix: Revert to relative ajax urls --- .travis.yml | 7 ++----- client/src/components/Donation/components/DonateForm.js | 2 +- client/src/utils/ajax.js | 4 +--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 249c19ba60..1ae4ddf930 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ node_js: cache: directories: - - "$HOME/.npm" + - '$HOME/.npm' env: global: @@ -24,13 +24,10 @@ before_script: jobs: include: - stage: Unit and Integration tests - script: - - npm run ensure-env - - npm test + script: test - stage: Artifacts builds if: branch = master && type != pull_request script: bash tools/ci-scripts/trigger-build.sh install: skip before_script: skip - diff --git a/client/src/components/Donation/components/DonateForm.js b/client/src/components/Donation/components/DonateForm.js index b0eeeade59..e133a04374 100644 --- a/client/src/components/Donation/components/DonateForm.js +++ b/client/src/components/Donation/components/DonateForm.js @@ -121,7 +121,7 @@ class DonateForm extends Component { })); const chargeStripePath = isSignedIn ? - `${apiLocation}/internal/donate/charge-stripe` : + `/internal/donate/charge-stripe` : `${apiLocation}/unauthenticated/donate/charge-stripe`; return postJSON$(chargeStripePath, { token, diff --git a/client/src/utils/ajax.js b/client/src/utils/ajax.js index 4743eadd27..84a69a9ed1 100644 --- a/client/src/utils/ajax.js +++ b/client/src/utils/ajax.js @@ -1,8 +1,6 @@ import axios from 'axios'; -import { apiLocation } from '../../config/env.json'; - -const base = `${apiLocation}/internal`; +const base = `/internal`; function get(path) { return axios.get(`${base}${path}`);