nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Fix: Use local venue data for development instead of prod data

Open kavishsathia opened this issue 1 year ago • 4 comments

Context

Closes #3803

Implementation

The solution checks if the user is on localhost, and if they are, it will opt to use the local venue data instead of the production data by default. To override this behavior, the user can add a query parameter prodVenue to their URL, which will enable them to use production data instead.

Other Information

kavishsathia avatar Aug 24 '24 01:08 kavishsathia

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 6:59am
nusmods-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 6:59am

vercel[bot] avatar Aug 24 '24 01:08 vercel[bot]

@kavishsathia is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 24 '24 01:08 vercel[bot]

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 54.57%. Comparing base (2d4743d) to head (c536886). Report is 25 commits behind head on master.

Files with missing lines Patch % Lines
website/src/utils/debug.ts 25.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3810      +/-   ##
==========================================
+ Coverage   53.87%   54.57%   +0.69%     
==========================================
  Files         274      274              
  Lines        6032     6056      +24     
  Branches     1449     1449              
==========================================
+ Hits         3250     3305      +55     
+ Misses       2782     2751      -31     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 28 '24 07:08 codecov[bot]

May I know what's the motivation behind changing this default?

zwliew avatar Sep 10 '24 01:09 zwliew

I've made the change to use NUSMODS_ENV per Ravern's review. Also, I re-added prodVenue to override the default in when in the prod environment.

Thanks for the initial patch!

zwliew avatar Nov 25 '24 07:11 zwliew