Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Changes Related To Deployment To The Testing Environment #35

Merged
merged 3 commits into from
Apr 21, 2020

Conversation

apbendi
Copy link
Contributor

@apbendi apbendi commented Apr 21, 2020

No description provided.

@apbendi apbendi requested a review from mds1 April 21, 2020 10:48
@mds1
Copy link
Contributor

mds1 commented Apr 21, 2020

The convention I've been using to send requests was to call the API with a leading slash, e.g.

const response = await this.$serverApi.get(`/api/votes/${this.fancyId}`);

and axios automatically prepends the baseURL. The baseURL had a trailing slash, and I'm not sure if axios is smart enough to remove duplicates or not, so in the last commit I just removed that trailing slash.

I also just add an else clause to throw an error if somehow the environment is not DEV or PROD because that seems like good practice.

Check out that last commit and feel free to merge if you don't have any changes

@apbendi apbendi merged commit 1922b0b into master Apr 21, 2020
@mds1 mds1 deleted the deployment branch April 22, 2020 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants