1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Fixes for Code Review

This commit is contained in:
Andreas Böhler 2019-03-21 16:46:46 +01:00
parent feb2f9ae82
commit afbd8df072
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class TaskApiController extends BaseAPIController
{
$tasks = Task::scope()
->withTrashed()
->with('client', 'invoice', 'project', 'task_status')
->with('client', 'invoice', 'project', 'task_status', 'user')
->orderBy('updated_at', 'desc');
return $this->listResponse($tasks);

View File

@ -63,7 +63,7 @@ class TaskTransformer extends EntityTransformer
{
return array_merge($this->getDefaults($task), [
'id' => (int) $task->public_id,
'user_id' => (int) $task->user_id,
'user_id' => (int) $task->user->public_id,
'username' => $task->user->getDisplayName(),
'description' => $task->description ?: '',
'duration' => $task->getDuration() ?: 0,