Change routes from packages/<action> to packages/manage/<action> to avoid conflicts with package ids #3131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if someone creates a package with an id of "upload", "upload-progress", "verify-upload", or "cancel-upload", they can potentially run into conflicts with our routing scheme. In other words, a package with an id of "upload" would be impossible to view through
packages/<id>
, because MVC would route it to our upload package path route,packages/upload
.To avoid conflicts with our system, this PR changes those routes to
packages/manage/upload
and so on. Sincepackages/<id>
andpackages/manage/<action>
are now completely distinct routes, users can upload a package with an id equal to any of our actions and view it without any issues. Note that a package id of "manage" is also still supported.Will be making some additional PRs in different repos to update the references to the old route URLs.
@maartenba @skofman1 @xavierdecoster
(Fixes #3130)