Show command type of the command is non-string.
This commit is contained in:
@@ -53,6 +53,10 @@ final class Index
|
||||
'args' => ag($task, 'args'),
|
||||
];
|
||||
|
||||
if (!is_string($item['command'])) {
|
||||
$item['command'] = get_debug_type($item['command']);
|
||||
}
|
||||
|
||||
if ($isEnabled) {
|
||||
$item['next_run'] = makeDate(ag($task, 'timer')->getNextRunDate());
|
||||
$item['prev_run'] = makeDate(ag($task, 'timer')->getPreviousRunDate());
|
||||
|
||||
@@ -25,11 +25,6 @@ final class View
|
||||
return api_error('Task not found.', HTTP_STATUS::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
$response = [
|
||||
'@self' => parseConfigValue(Index::URL . '/' . $id),
|
||||
...Index::formatTask($task)
|
||||
];
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK);
|
||||
return api_response(Index::formatTask($task), HTTP_STATUS::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user