ovh ended
This commit is contained in:
parent
20478738ca
commit
13162a34fc
@ -347,10 +347,11 @@ export default class CustomersService extends BaseService {
|
||||
private async sendSmsCodeToCustomer(totpPin: number, customer: Customer) {
|
||||
try {
|
||||
// Sélectionnez le fournisseur de SMS en fonction de la variable d'environnement
|
||||
const selectedProvider = this.variables.SMS_PROVIDER === 'OVH' ? this.ovhService : null;
|
||||
const selectedProvider = this.variables.SMS_PROVIDER === 'OVH' ? this.ovhService : this.ovhService;
|
||||
|
||||
// Envoi du SMS
|
||||
let success = await selectedProvider.sendSms(customer.contact?.phone_number, totpPin);
|
||||
if(!customer.contact?.phone_number) return false;
|
||||
let success = await selectedProvider.sendSms(customer.contact?.phone_number, totpPin.toString());
|
||||
|
||||
// Si l'envoi échoue, basculez automatiquement sur le second fournisseur
|
||||
// if (!success) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user