Skip to content

Commit b2e6f7d

Browse files
committed
Fixed deactive endpoint
1 parent a179d57 commit b2e6f7d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Http/Controllers/ActiveTasksController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Http\JsonResponse;
66
use Illuminate\Http\Request;
77
use Studio\Totem\Contracts\TaskInterface;
8+
use Studio\Totem\Task;
89

910
class ActiveTasksController extends Controller
1011
{
@@ -39,12 +40,12 @@ public function store(Request $request): JsonResponse
3940
/**
4041
* Remove the specified resource from storage.
4142
*
42-
* @param int $id
43+
* @param Task $task
4344
* @return JsonResponse
4445
*/
45-
public function destroy(int $id): JsonResponse
46+
public function destroy(Task $task): JsonResponse
4647
{
47-
$task = $this->tasks->deactivate($id);
48+
$task = $this->tasks->deactivate($task->id);
4849

4950
return response()->json($task, 200);
5051
}

0 commit comments

Comments
 (0)