Fix #100 Fix and move the SMS log to OvhSMS library

This commit is contained in:
Timothée Jaussoin 2023-05-04 17:37:37 +02:00
parent f409f19ab4
commit 63e13502dc
2 changed files with 2 additions and 1 deletions

View file

@ -153,7 +153,6 @@ class AccountController extends Controller
$account->save();
Log::channel('events')->info('API: Account created using the public endpoint by phone', ['id' => $account->identifier]);
Log::channel('events')->info('OVH SMS sending: Sending an SMS with the recovery code', ['id' => $account->identifier, 'confirmation_key', $account->conformation_key]);
$ovhSMS = new OvhSMS;
$ovhSMS->send($request->get('phone'), 'Your ' . config('app.name') . ' recovery code is ' . $account->confirmation_key);

View file

@ -71,6 +71,8 @@ class OvhSMS
'validityPeriod' => 2880
];
Log::channel('events')->info('OVH SMS sending', ['to' => $to, 'message' => $message]);
try {
$this->api->post('/sms/'. $this->smsService . '/jobs', $content);
// One credit removed