mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for Code Review
This commit is contained in:
parent
feb2f9ae82
commit
afbd8df072
@ -45,7 +45,7 @@ class TaskApiController extends BaseAPIController
|
|||||||
{
|
{
|
||||||
$tasks = Task::scope()
|
$tasks = Task::scope()
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->with('client', 'invoice', 'project', 'task_status')
|
->with('client', 'invoice', 'project', 'task_status', 'user')
|
||||||
->orderBy('updated_at', 'desc');
|
->orderBy('updated_at', 'desc');
|
||||||
|
|
||||||
return $this->listResponse($tasks);
|
return $this->listResponse($tasks);
|
||||||
|
@ -63,7 +63,7 @@ class TaskTransformer extends EntityTransformer
|
|||||||
{
|
{
|
||||||
return array_merge($this->getDefaults($task), [
|
return array_merge($this->getDefaults($task), [
|
||||||
'id' => (int) $task->public_id,
|
'id' => (int) $task->public_id,
|
||||||
'user_id' => (int) $task->user_id,
|
'user_id' => (int) $task->user->public_id,
|
||||||
'username' => $task->user->getDisplayName(),
|
'username' => $task->user->getDisplayName(),
|
||||||
'description' => $task->description ?: '',
|
'description' => $task->description ?: '',
|
||||||
'duration' => $task->getDuration() ?: 0,
|
'duration' => $task->getDuration() ?: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user