Add compliance page mailing list base

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-25 14:59:00 +01:00
parent c0a69100e8
commit 4d2cb793b6
50 changed files with 6365 additions and 110 deletions

View File

@@ -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)
}