|
@@ -279,9 +279,11 @@ class PackageController extends Controller
|
|
|
return $this->redirect($this->generateUrl('search', array('q' => $name, 'reason' => 'package_not_found')));
|
|
|
}
|
|
|
|
|
|
- $package = $repo->findOneBy(['name' => $name]);
|
|
|
- if ($package) {
|
|
|
- $providers[] = $package;
|
|
|
+ if ($req->getRequestFormat() !== 'json') {
|
|
|
+ $package = $repo->findOneBy(['name' => $name]);
|
|
|
+ if ($package) {
|
|
|
+ $providers[] = $package;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
try {
|