mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
added AllowDenyIDs for get campaign by id endpoint
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -1514,9 +1514,11 @@ func ToCampaign(row *database.Campaign) (*model.Campaign, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
allowDeny := []*model.AllowDeny{}
|
allowDeny := []*model.AllowDeny{}
|
||||||
|
allowDenyIDs := []*uuid.UUID{}
|
||||||
if row.AllowDeny != nil {
|
if row.AllowDeny != nil {
|
||||||
for _, ad := range row.AllowDeny {
|
for _, ad := range row.AllowDeny {
|
||||||
allowDeny = append(allowDeny, ToAllowDeny(ad))
|
allowDeny = append(allowDeny, ToAllowDeny(ad))
|
||||||
|
allowDenyIDs = append(allowDenyIDs, ad.ID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var denyPage *model.Page
|
var denyPage *model.Page
|
||||||
@@ -1624,6 +1626,7 @@ func ToCampaign(row *database.Campaign) (*model.Campaign, error) {
|
|||||||
RecipientGroups: recipientGroups,
|
RecipientGroups: recipientGroups,
|
||||||
RecipientGroupIDs: nullable.NewNullableWithValue(recipientGroupIDs),
|
RecipientGroupIDs: nullable.NewNullableWithValue(recipientGroupIDs),
|
||||||
AllowDeny: allowDeny,
|
AllowDeny: allowDeny,
|
||||||
|
AllowDenyIDs: nullable.NewNullableWithValue(allowDenyIDs),
|
||||||
DenyPage: denyPage,
|
DenyPage: denyPage,
|
||||||
DenyPageID: denyPageID,
|
DenyPageID: denyPageID,
|
||||||
EvasionPage: evasionPage,
|
EvasionPage: evasionPage,
|
||||||
|
|||||||
Reference in New Issue
Block a user