<?php
namespace Teknisa\Libs\Controller;

use Zeedhi\Framework\DTO\Request;
use Zeedhi\Framework\DTO\Response;
use Teknisa\Libs\Service\ReportBug as ReportBugService;

class ReportBug {

    private $reportBugService;

    public function __construct(ReportBugService $reportBugService){
        $this->reportBugService = $reportBugService;
    }

    public function sendEmail(Request $request, Response $response){
        $dataSet = $request->getDataSet();
        $row = $dataSet->getRows()[0];
        $this->reportBugService->sendEmail($row);
    }
}