0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-19 14:41:32 +00:00

Updated old exportService name in controllers

This commit is contained in:
Dan Brown 2020-11-22 01:26:14 +00:00
parent a042e22481
commit ebeca256f0
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
5 changed files with 30 additions and 30 deletions
app/Http/Controllers

View file

@ -9,15 +9,15 @@ class ChapterExportController extends Controller
{
protected $chapterRepo;
protected $exportService;
protected $exportFormatter;
/**
* ChapterExportController constructor.
*/
public function __construct(ChapterRepo $chapterRepo, ExportFormatter $exportService)
public function __construct(ChapterRepo $chapterRepo, ExportFormatter $exportFormatter)
{
$this->chapterRepo = $chapterRepo;
$this->exportService = $exportService;
$this->exportFormatter = $exportFormatter;
}
/**
@ -28,7 +28,7 @@ class ChapterExportController extends Controller
public function pdf(string $bookSlug, string $chapterSlug)
{
$chapter = $this->chapterRepo->getBySlug($bookSlug, $chapterSlug);
$pdfContent = $this->exportService->chapterToPdf($chapter);
$pdfContent = $this->exportFormatter->chapterToPdf($chapter);
return $this->downloadResponse($pdfContent, $chapterSlug . '.pdf');
}
@ -40,7 +40,7 @@ class ChapterExportController extends Controller
public function html(string $bookSlug, string $chapterSlug)
{
$chapter = $this->chapterRepo->getBySlug($bookSlug, $chapterSlug);
$containedHtml = $this->exportService->chapterToContainedHtml($chapter);
$containedHtml = $this->exportFormatter->chapterToContainedHtml($chapter);
return $this->downloadResponse($containedHtml, $chapterSlug . '.html');
}
@ -51,7 +51,7 @@ class ChapterExportController extends Controller
public function plainText(string $bookSlug, string $chapterSlug)
{
$chapter = $this->chapterRepo->getBySlug($bookSlug, $chapterSlug);
$chapterText = $this->exportService->chapterToPlainText($chapter);
$chapterText = $this->exportFormatter->chapterToPlainText($chapter);
return $this->downloadResponse($chapterText, $chapterSlug . '.txt');
}
}