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

Use local venue data for development instead of prod data #3803

Open
xinyuwang-nus opened this issue Aug 21, 2024 · 2 comments · May be fixed by #3810
Open

Use local venue data for development instead of prod data #3803

xinyuwang-nus opened this issue Aug 21, 2024 · 2 comments · May be fixed by #3810

Comments

@xinyuwang-nus
Copy link
Contributor

Describe the bug

The venue json data is updated locally, but the localhost is using prod data

To Reproduce

Steps to reproduce the behavior:

  1. Change local data for any venue, launch localhost and find venue data is not updated
  2. Go to inspection on browser and see screenshot below

Expected behavior

Use local venue data instead of prod data

Screenshots


Pasted Graphic 1 copy

@kaze-droid
Copy link
Contributor

kaze-droid commented Aug 22, 2024

Im still quite new to this so correct me if I'm wrong but there are two seperate APIs for venues:

  • https://api.nusmods.com/v2/{academicYear}/semesters/{semester}/venues.json: used for the list of venues
  • https://github.nusmods.com/venues: used for the roomName, floor and coordinates for each venue (which is the prod data being used in place of venue.json)

The feature to use local venue data (venues.json) is already implemented via the preferRepoVenues function in src/utils/debug.ts and allows you to force the application to use local data by appending the query string localVenue=1 to the URL but its not enabled by default

@kavishsathia
Copy link
Contributor

Hi, I will work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants