Skip to content

Commit

Permalink
Merge pull request #346 from JohnVillalovos/jlvillal/short_time
Browse files Browse the repository at this point in the history
fix: use `TimeInterval:ToShortString` in API response
  • Loading branch information
effgarces authored May 21, 2024
2 parents 0b61505 + 812e8c7 commit 4f86fbc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions WebServices/Responses/ResourceResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ public function __construct(IRestServer $server, $resource, $attributes)
$this->location = $resource->GetLocation();
$this->contact = $resource->GetContact();
$this->notes = $resource->GetNotes();
$this->maxLength = $resource->GetMaxLength()->__toString();
$this->minLength = $resource->GetMinLength()->__toString();
$this->maxNotice = $resource->GetMaxNotice()->__toString();
$this->minNoticeAdd = $resource->GetMinNoticeAdd()->__toString();
$this->minNoticeUpdate = $resource->GetMinNoticeUpdate()->__toString();
$this->minNoticeDelete = $resource->GetMinNoticeDelete()->__toString();
$this->maxLength = $resource->GetMaxLength()->ToShortString();
$this->minLength = $resource->GetMinLength()->ToShortString();
$this->maxNotice = $resource->GetMaxNotice()->ToShortString();
$this->minNoticeAdd = $resource->GetMinNoticeAdd()->ToShortString();
$this->minNoticeUpdate = $resource->GetMinNoticeUpdate()->ToShortString();
$this->minNoticeDelete = $resource->GetMinNoticeDelete()->ToShortString();
$this->requiresApproval = $resource->GetRequiresApproval();
$this->allowMultiday = $resource->GetAllowMultiday();
$this->maxParticipants = $resource->GetMaxParticipants();
$this->description = $resource->GetDescription();
$this->scheduleId = $resource->GetScheduleId();
$this->statusId = $resource->GetStatusId();
$this->statusReasonId = $resource->GetStatusReasonId();
$this->bufferTime = $resource->GetBufferTime()->__toString();
$this->bufferTime = $resource->GetBufferTime()->ToShortString();
$this->typeId = $resource->GetResourceTypeId();
$this->groupIds = $resource->GetResourceGroupIds();
$this->autoReleaseMinutes = $resource->GetAutoReleaseMinutes();
Expand Down Expand Up @@ -97,7 +97,7 @@ class ExampleResourceResponse extends ResourceResponse
public function __construct()
{
$interval = new TimeInterval(120);
$length = $interval->__toString();
$length = $interval->ToShortString();
$this->resourceId = 123;
$this->name = 'resource name';
$this->location = 'location';
Expand Down

0 comments on commit 4f86fbc

Please sign in to comment.