Update resend otp

This commit is contained in:
Lakhan Samani
2023-07-23 10:03:37 +05:30
parent fac333e195
commit 55fc4b2608
20 changed files with 162 additions and 130 deletions

View File

@@ -8,6 +8,7 @@ import (
api "github.com/twilio/twilio-go/rest/api/v2010"
)
// SendSMS util to send sms
// TODO: Should be restructured to interface when another provider is added
func SendSMS(sendTo, messageBody string) error {
twilioAPISecret, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyTwilioAPISecret)
@@ -20,7 +21,7 @@ func SendSMS(sendTo, messageBody string) error {
log.Debug("Failed to get api key: ", err)
return err
}
twilioSenderFrom, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyTwilioSenderFrom)
twilioSenderFrom, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyTwilioSender)
if err != nil || twilioSenderFrom == "" {
log.Debug("Failed to get sender: ", err)
return err