[Notifier] Fixed base_uri while call auth/time API

This commit is contained in:
Simon Leblanc 2020-08-20 01:38:33 +02:00 committed by Fabien Potencier
parent 679cc4dff1
commit 2f91485c40

View File

@ -88,7 +88,7 @@ final class OvhCloudTransport extends AbstractTransport
if (200 !== $response->getStatusCode()) {
$error = $response->toArray(false);
throw new TransportException(sprintf('Unable to send the SMS: %s.', $error['message']), $response);
throw new TransportException(sprintf('Unable to send the SMS: "%s".', $error['message']), $response);
}
}
@ -97,7 +97,7 @@ final class OvhCloudTransport extends AbstractTransport
*/
private function calculateTimeDelta(): int
{
$endpoint = sprintf('%s/auth/time', $this->getEndpoint());
$endpoint = sprintf('https://%s/1.0/auth/time', $this->getEndpoint());
$response = $this->client->request('GET', $endpoint);
return $response->getContent() - time();