Skip to content

Commit

Permalink
fix: use carbon function
Browse files Browse the repository at this point in the history
  • Loading branch information
brokeyourbike committed Oct 30, 2021
1 parent 9725c35 commit bf8b36e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getAuthToken(): ?string
$this->cache->set(
$this->authTokenCacheKey(),
$responseJson['tokenDetail']['token'],
$expiresAt->subMinute()->diffInSeconds($currentTime) - $this->ttlMarginInSeconds
$expiresAt->subSeconds($this->ttlMarginInSeconds)->diffInSeconds($currentTime)
);

return $responseJson['tokenDetail']['token'];
Expand Down

0 comments on commit bf8b36e

Please sign in to comment.