changes
This commit is contained in:
@@ -2,22 +2,22 @@
|
||||
|
||||
namespace App\Containers\Dashboard\UI\WEB\Controllers;
|
||||
|
||||
use App\Containers\Dashboard\Tasks\GetDraftPostsTask;
|
||||
use App\Containers\Dashboard\Tasks\GetAiPreparedPostsTask;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class IndexDashboardController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly GetDraftPostsTask $getDraftPostsTask,
|
||||
private readonly GetAiPreparedPostsTask $getAiPreparedPostsTask,
|
||||
) {}
|
||||
|
||||
public function __invoke(Request $request): \Inertia\Response
|
||||
{
|
||||
$draftPosts = $this->getDraftPostsTask->run();
|
||||
$aiPreparedPosts = $this->getAiPreparedPostsTask->run();
|
||||
|
||||
return inertia()->render('Dashboard/Main', [
|
||||
'draftPosts' => $draftPosts,
|
||||
'aiPreparedPosts' => $aiPreparedPosts,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user