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

Fix fetch status url for staging/prod #2579

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

Kevan-Y
Copy link
Contributor

@Kevan-Y Kevan-Y commented Dec 7, 2021

Issue This PR Addresses

Related #2418

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Because staging/prod adds /v1/status, the URL for fetching turns into /v1/status/v1/status/status
Used PATH_PREFIX to fix that issue.

  • In development (local), route will be PATH_PREFIX/status
  • In staging/prod, route /status

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@Kevan-Y Kevan-Y self-assigned this Dec 7, 2021
@gitpod-io
Copy link

gitpod-io bot commented Dec 7, 2021

.catch((err) => res.status(500).json({ error: err.message }));
});
service.router.get(
`${process.env.PATH_PREFIX ? process.env.PATH_PREFIX : ''}/status`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`${process.env.PATH_PREFIX || ''}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@HyperTHD HyperTHD merged commit c092a7f into Seneca-CDOT:master Dec 7, 2021
mqnguyen5 pushed a commit to mqnguyen5/telescope that referenced this pull request Dec 9, 2021
Kevan-Y added a commit to Kevan-Y/telescope that referenced this pull request Dec 9, 2021
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.

4 participants