Indeed, before this patch, if we had only one result, we had to click then
we get the result. Now if there is only one package in the results, we redirect
directly to its stats page.
In the other side, I do not think that returning 404 when we requests for
example /packages/fjwiofjowejfiewjfojio is a good idea. That is why, I
simply added a redirection to the /search/fjwiofjowejfiewjfojio page in
that case.
Indeed, before this patch, if we had only one result, we had to click then we get the result. Now if there is only one package in the results, we redirect directly to its stats page.
In the other side, I do not think that returning
404
when we requests for example/packages/fjwiofjowejfiewjfojio
is a good idea. That is why, I simply added a redirection to the/search/fjwiofjowejfiewjfojio
page in that case.