mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-08-23 10:52:44 +02:00
add option to add data to webhook events
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@ type Campaign struct {
|
||||
IsAnonymous nullable.Nullable[bool] `json:"isAnonymous"`
|
||||
IsTest nullable.Nullable[bool] `json:"isTest"`
|
||||
Obfuscate nullable.Nullable[bool] `json:"obfuscate"`
|
||||
WebhookIncludeData nullable.Nullable[bool] `json:"webhookIncludeData"`
|
||||
TemplateID nullable.Nullable[uuid.UUID] `json:"templateID"`
|
||||
Template *CampaignTemplate `json:"template"`
|
||||
CompanyID nullable.Nullable[uuid.UUID] `json:"companyID"`
|
||||
@@ -332,6 +333,12 @@ func (c *Campaign) ToDBMap() map[string]any {
|
||||
m["obfuscate"] = v
|
||||
}
|
||||
}
|
||||
if c.WebhookIncludeData.IsSpecified() {
|
||||
m["webhook_include_data"] = false
|
||||
if v, err := c.WebhookIncludeData.Get(); err == nil {
|
||||
m["webhook_include_data"] = v
|
||||
}
|
||||
}
|
||||
if c.TemplateID.IsSpecified() {
|
||||
m["campaign_template_id"] = nil
|
||||
if v, err := c.TemplateID.Get(); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user