-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed-new-email-api #146
Fixed-new-email-api #146
Conversation
{ | ||
var messageSettingsVault = JsonConvert.DeserializeObject<MessageSettingsVault>(_secrets.Data["Email"].ToString()); | ||
Data.Add("Email:ApiKey", messageSettingsVault.ApiKey); | ||
Data.Add("Email:TemplateId", messageSettingsVault.TemplateId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
}, | ||
"Email": { | ||
"ApiKey": "", | ||
"TemplateId": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -45,5 +47,13 @@ public async Task<bool> Post(MessageRequestModel message) | |||
{ | |||
return await _messageProviderService.SendMessage(message); | |||
} | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add description for this API, take reference of sms API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
public async Task SendEmailAsync(EmailInfo emailInfo) | ||
{ | ||
var apiKey = _configuration["Email:ApiKey"]; | ||
var templateId = !string.IsNullOrEmpty(emailInfo.TemplateId) ? emailInfo.TemplateId : _configuration["emailInfo:TemplateId"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will not have TemplateId in config..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
_configuration = configuration; | ||
_httpClientFactory = httpClientFactory; | ||
} | ||
public async Task SendEmailAsync(EmailInfo emailInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add try catch in this method, refer sms method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
_configuration = configuration; | ||
_httpClientFactory = httpClientFactory; | ||
} | ||
public async Task SendEmailAsync(EmailInfo emailInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add required validation for email fields like To, TemplateId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…-Service/new-email-api Fixed-new-email-api
Fixed-new-email-api
No description provided.