Fix endpoint
What does this MR do and why?
Fixes #412880
I did some investigation and there is a bug in the next button. The button changes the url of the page and adds a .json at the end of the pathname. So, when you click on next button, you are supposed to go to this link: https://gitlab.archlinux.org/explore/projects?name=stat&non_archived=true&page=2&sort=latest_activity_desc but instead, you are directed to this link: https://gitlab.archlinux.org/explore/projects.json?name=stat&non_archived=true&page=2&sort=latest_activity_desc.
This issue is only visible when you have a string added in the search inputbox. So, the next button works well if your search input box is empty.
I am suspecting this is due to the fact that the end point that we are hitting is this /api/:version/projects.json (app/assets/javascripts/api/projects_api.js) and this is due to the fact that we have a replace method to change it. I removed the replace method and it should work well now.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.