smartAPI icon indicating copy to clipboard operation
smartAPI copied to clipboard

the slug.smart-api.info link adds extra string to the URL at load time

Open newgene opened this issue 4 years ago • 1 comments

The API page like:

https://api.smart-api.info/

or

https://mygene.smart-api.info/

should be rendered without adding the extra "/ui/" to the URL, like this one below:

https://api.smart-api.info/ui/27a5b60716c3a401f2c021a5b718c5b1

newgene avatar May 27 '21 16:05 newgene

This is part of long discussion as seen here on how to change current component used by router-view without changing current URL. It's sort of not what you want to do, however we can manipulate the url after the navigation redirect to the UI page. You can see how that works on the router.js file, there's a navigation guard there that looks for slugs and redirects if it finds one. A quick way to "fix" this is with the history.replaceState to change the url back to normal without the router reacting. It's a bit of a hack but works. I'll add this on our next update and it should work as requested.

marcodarko avatar May 27 '21 20:05 marcodarko