fix: [galaxies:export] Return application/json MIME type for all exports

pull/6120/head
mokaddem 2020-07-31 15:28:16 +02:00
parent 7a6ce50fd2
commit 75e12e692e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -250,8 +250,8 @@ class GalaxiesController extends AppController
$clusters = $this->Galaxy->GalaxyCluster->unsetFieldsForExport($clusters);
$content = json_encode($clusters, JSON_PRETTY_PRINT);
$this->response->body($content);
$this->response->type('json');
if ($this->request->data['download'] == 'download') {
$this->response->type('json');
$this->response->download(sprintf('galaxy_%s_%s.json', $galaxy['Galaxy']['uuid'], time()));
}
return $this->response;