remove condition

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-03-15 16:13:13 +01:00
parent 39702cec9f
commit 2789f0e1d9
-5
View File
@@ -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);