implemented step 12 by Gemini

- Task actions
This commit is contained in:
2026-06-14 12:42:41 +02:00
parent c01eb30632
commit 2b9b62b0aa
5 changed files with 174 additions and 3 deletions

View File

@ -64,6 +64,7 @@ try {
// Router
$projectActions = new \App\Actions\ProjectActions();
$taskActions = new \App\Actions\TaskActions();
$consentService = new \App\Services\ConsentService();
switch ($action) {
@ -130,6 +131,14 @@ try {
sendResponse(true, $result);
break;
case 'generateWebsite':
$projectId = $data['project_id'] ?? null;
if (!$projectId) {
sendResponse(false, ['code' => 'MISSING_PROJECT_ID', 'message' => 'Project ID is required.'], 400);
}
sendResponse(true, $taskActions->generateWebsite($userId, $projectId));
break;
default:
sendResponse(false, ['code' => 'UNKNOWN_ACTION', 'message' => "Action '$action' is not defined."], 404);
break;