Add compliance page mailing list base
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -480,12 +480,20 @@ func (s *OrganizationService) CreateOrganization(
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
mailingList = &coredata.MailingList{
|
||||
ID: gid.New(tenantID, coredata.MailingListEntityType),
|
||||
OrganizationID: organization.ID,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
trustCenter = &coredata.TrustCenter{
|
||||
ID: gid.New(tenantID, coredata.TrustCenterEntityType),
|
||||
OrganizationID: organization.ID,
|
||||
TenantID: organization.TenantID,
|
||||
Active: false,
|
||||
Slug: slug.Make(organization.Name),
|
||||
MailingListID: &mailingList.ID,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
@@ -616,6 +624,10 @@ func (s *OrganizationService) CreateOrganization(
|
||||
return fmt.Errorf("cannot insert organization context: %w", err)
|
||||
}
|
||||
|
||||
if err := mailingList.Insert(ctx, tx, scope); err != nil {
|
||||
return fmt.Errorf("cannot insert mailing list: %w", err)
|
||||
}
|
||||
|
||||
if err := trustCenter.Insert(ctx, tx, scope); err != nil {
|
||||
return fmt.Errorf("cannot insert trust center: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user