From dee61c2633fdd088ca6b93f648f4417310c6d991 Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Thu, 25 Dec 2025 11:27:39 +0100 Subject: [PATCH] added AllowDenyIDs for get campaign by id endpoint Signed-off-by: Ronni Skansing --- backend/repository/campaign.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/repository/campaign.go b/backend/repository/campaign.go index 1b165de..efca882 100644 --- a/backend/repository/campaign.go +++ b/backend/repository/campaign.go @@ -1514,9 +1514,11 @@ func ToCampaign(row *database.Campaign) (*model.Campaign, error) { } } allowDeny := []*model.AllowDeny{} + allowDenyIDs := []*uuid.UUID{} if row.AllowDeny != nil { for _, ad := range row.AllowDeny { allowDeny = append(allowDeny, ToAllowDeny(ad)) + allowDenyIDs = append(allowDenyIDs, ad.ID) } } var denyPage *model.Page @@ -1624,6 +1626,7 @@ func ToCampaign(row *database.Campaign) (*model.Campaign, error) { RecipientGroups: recipientGroups, RecipientGroupIDs: nullable.NewNullableWithValue(recipientGroupIDs), AllowDeny: allowDeny, + AllowDenyIDs: nullable.NewNullableWithValue(allowDenyIDs), DenyPage: denyPage, DenyPageID: denyPageID, EvasionPage: evasionPage,