Skip to content

Commit

Permalink
Merge pull request #859 from bcgov/yj
Browse files Browse the repository at this point in the history
fix(dss-1063)
  • Loading branch information
ychung-mot authored Dec 9, 2024
2 parents f4775b7 + 7e41b30 commit 8c7867b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/StrDss.Data/Repositories/OrganizationRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ public async Task<DssOrganization> CreatePlatformAsync(PlatformCreateDto dto)
CreateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
CreateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
CreateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);

return entity;
}
Expand Down Expand Up @@ -268,6 +270,8 @@ public async Task UpdatePlatformAsync(PlatformUpdateDto dto)
UpdateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
UpdateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
UpdateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
}

private void UpdateContact(DssOrganization entity, string messageType, string? emailAddress, bool isPrimary)
Expand Down Expand Up @@ -306,6 +310,8 @@ public async Task<DssOrganization> CreatePlatformSubAsync(PlatformSubCreateDto d
CreateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
CreateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
CreateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);

return entity;
}
Expand All @@ -322,6 +328,8 @@ public async Task UpdatePlatformSubAsync(PlatformSubUpdateDto dto)
UpdateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
UpdateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
UpdateContact(entity, EmailMessageTypes.BatchTakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
}

public async Task<PagedDto<LocalGovViewDto>> GetLocalGovs(int pageSize, int pageNumber, string orderBy, string direction)
Expand Down

0 comments on commit 8c7867b

Please sign in to comment.