implemented step 12 by Gemini
- Task actions
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user