diff --git a/apps/users/models.py b/apps/users/models.py index 2e205b9..2473397 100644 --- a/apps/users/models.py +++ b/apps/users/models.py @@ -166,11 +166,15 @@ class User(AbstractUser): return result def send_otp(self): - sms_body = f'Gooyal OTP: {self.otp}' - self.notify(sms_body) + self.notify(body=str(self.otp), title='OTP ') - def notify(self, body, notification_type='sms'): - service_client.notify(phone_number=self.phone_number, body=body) + def notify(self, body, title= None, notification_type='sms'): + print(service_client.notification.submit_notification(phone_number=self.phone_number, + title=title, + body=body, + user_uuid=self.uuid, + notification_type=1, + )) def __str__(self):