Fixed duration in time entries index endpoint

This commit is contained in:
Constantin Graf
2024-05-14 17:02:42 +02:00
committed by Constantin Graf
parent 0448ebc180
commit f47b3cdf98

View File

@@ -32,7 +32,7 @@ class TimeEntryResource extends BaseResource
*/ */
'end' => $this->formatDateTime($this->resource->end), 'end' => $this->formatDateTime($this->resource->end),
/** @var int|null $duration Duration of time entry in seconds */ /** @var int|null $duration Duration of time entry in seconds */
'duration' => $this->resource->getDuration()?->seconds, 'duration' => (int) $this->resource->getDuration()?->totalSeconds,
/** @var string|null $description Description of time entry */ /** @var string|null $description Description of time entry */
'description' => $this->resource->description, 'description' => $this->resource->description,
/** @var string|null $task_id ID of task */ /** @var string|null $task_id ID of task */