The Url registration parts of the Toolhub frontend were the earliest API calls we added and do not follow the patterns that we have built up over the subsequent year of work.
Things to fix in vue/src/store/user.js:
- registerUrl should call this._vm.$notify.success(...) to signal the user when a URL registration succeeded.
- registerUrl should use getFailurePayload and looping over the returned error collection to notify the user of errors in registration.
- unregisterUrl should call this._vm.$notify.success(...) to signal the user when a URL removal succeeded.
- unregisterUrl should getFailurePayload and looping over the returned error collection to notify the user of errors in registration.
- user.spec.js tests should be updated to validate the new behaviors.
(optional) move crawler URL related functions and state out of vue/src/store/user.js into vue/src/store/crawler.js to match the backend API organization of the endpoints
Original bug report:
- Tried to add https://magnustools.toolforge.org/toolinfo_buggregator.json on https://toolhub.wikimedia.org/add-or-remove-tools?tab=urls but failed with "bad request". Tried http instead of https and it worked.
- I now see the URL in a list of one. Is that added now? Do I need to do something? Will it auto-update? I have reloaded the page but eg the "drawshield" tool that is in the toolinfo.json is still not found.