mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

fix non-credit filter #1301

Closed abeglova closed 9 months ago

abeglova commented 9 months ago

What are the relevant tickets?

None.

Selecting 'Non-Credit' at https://ocw.mit.edu/search/ does not work. This fixes the issue

Description (What does it do?)

We have parameter validation for the ocw search. Unfortunately, the parameter validation needs to be updated when we update the results from the api.

How can this be tested?

Set SEARCH_API_URL=https://open.mit.edu/api/v0/search/ Run yarn start www Turn CORS off in your browser Go to http://localhost:3000/search/

Verify that you can select non-credit

Additional Context

Needing to manually update the possible parameters every time they change isn't great.

Once ocw is migrated to the new search api and https://github.com/mitodl/mit-open/issues/269 is implemented we can get the possible parameters from the client that will be created by https://github.com/mitodl/mit-open/issues/269

github-actions[bot] commented 9 months ago

Netlify Deployments:
www: https://ocw-hugo-themes-www-pr-1301--ocw-next.netlify.app/
Course v2: https://ocw-hugo-themes-course-v2-pr-1301--ocw-next.netlify.app/

ibrahimjaved12 commented 9 months ago

Thanks for fixing this! @abeglova I had changed Non Credit to Non-Credit in ocw-hugo-projects, but I wasn't aware that there was a coupling of this in ocw-hugo-themes.