Merge branch 'features/admin-inscription' into 'dev'
Features/admin inscription See merge request sae-but2/2025-26/gestion-benevoles-association/backend!28
This commit is contained in:
commit
138077fa75
2 files changed
+1
-6
No files matched your search
@@ -213,11 +213,6 @@ class TasksController extends Controller
|
|||||||
return response()->json(["message" => "Task not found"], 404);
|
return response()->json(["message" => "Task not found"], 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$task->event) {
|
|
||||||
Log::error("Relation 'event' manquante pour la tâche ID: " . $task->id);
|
|
||||||
return response()->json(["message" => "Task is missing its parent event"], 422);
|
|
||||||
}
|
|
||||||
|
|
||||||
$isAssigned = $task->users()->where('user_id', $id)->exists();
|
$isAssigned = $task->users()->where('user_id', $id)->exists();
|
||||||
if (!$isAssigned) {
|
if (!$isAssigned) {
|
||||||
return response()->json(["message" => "User is not assigned to this task"], 400);
|
return response()->json(["message" => "User is not assigned to this task"], 400);
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ return [
|
|||||||
|
|
||||||
'allowed_methods' => ['*'],
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
'allowed_origins' => env('DEV', 0) == 1 ? ['http://localhost:5173'] : ['http://localhost'],
|
'allowed_origins' => ['*'],
|
||||||
|
|
||||||
'allowed_origins_patterns' => [],
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user