From 4a75925f5db2edf318629a8869684308522b813d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 3 May 2017 11:18:30 +1000 Subject: [PATCH] Allow the API to update is_running fields in tasks (#1472) --- app/Ninja/Repositories/TaskRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Ninja/Repositories/TaskRepository.php b/app/Ninja/Repositories/TaskRepository.php index 5bf89158af..1ad61307bb 100644 --- a/app/Ninja/Repositories/TaskRepository.php +++ b/app/Ninja/Repositories/TaskRepository.php @@ -146,6 +146,8 @@ class TaskRepository extends BaseRepository } elseif ($data['action'] == 'stop' && $task->is_running) { $timeLog[count($timeLog) - 1][1] = time(); $task->is_running = false; + } elseif ($data['action'] == 'offine'){ + $task->is_running = $data['is_running']; } }