Skip to content

Commit

Permalink
ref: extract-data-file.json.twig has been replaced by FlashMessageLog…
Browse files Browse the repository at this point in the history
…ger::buildJsonResponse
  • Loading branch information
theus77 committed Feb 22, 2024
1 parent 832dbb8 commit 83d02f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@ public function extractFileContent(Request $request, string $sha1, bool $forced
throw new NotFoundHttpException(\sprintf('Asset %s not found', $sha1));
}

$response = $this->render("@$this->templateNamespace/ajax/extract-data-file.json.twig", [
$response = $this->flashMessageLogger->buildJsonResponse([
'success' => !$data->isEmpty(),
'data' => $data,
'content' => $data->getContent(),
'author' => $data->getAuthor(),
'date' => $data->getDate(),
'language' => $data->getLocale(),
'title' => $data->getTitle(),
]);
$response->headers->set('Content-Type', 'application/json');

Expand Down

This file was deleted.

0 comments on commit 83d02f6

Please sign in to comment.