Skip to content

Commit

Permalink
Merge pull request #247 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: bcc admin for batch takedown request
  • Loading branch information
ychung-mot authored Apr 30, 2024
2 parents dabfaa3 + fcbd40c commit eee8ef6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/_backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ spec:
export GEOCODER_CLIENT_ID="{{ .Data.data.GEOCODER_CLIENT_ID }}"
export SA_PASS="{{ .Data.data.SA_PASS }}"
export SA_USER="{{ .Data.data.SA_USER }}"
export ADMIN_EMAIL="{{ .Data.data.ADMIN_EMAIL }}"
{{- end }}`}}
labels:
{{- include "app.selectorLabels" . | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions server/StrDss.Service/DelistingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,12 @@ private async Task ProcessTakedownRequestBatchEmailAsync(OrganizationDto platfor
var content = CsvHelperUtils.GetBase64CsvString(csvRecords);
var date = DateUtils.ConvertUtcToPacificTime(DateTime.UtcNow).ToString("yyyy-MM-dd-HH-mm");
var fileName = $"{platform.OrganizationNm} - {date}.csv";
var adminEmail = _config.GetValue<string>("ADMIN_EMAIL") ?? throw new Exception($"There's no admin eamil.");

var template = new BatchTakedownRequest(_emailService)
{
To = new string[] { contact!.EmailAddressDsc },
Bcc = new string[] { adminEmail! },
Info = $"{EmailMessageTypes.BatchTakedownRequest} for {platform.OrganizationNm}",
Attachments = new EmailAttachment[] { new EmailAttachment {
Content = content,
Expand Down

0 comments on commit eee8ef6

Please sign in to comment.