feat: fix webhook bug in RecordEx JSON (#3642)

This commit is contained in:
DacongDA 2025-03-08 00:20:59 +08:00 committed by GitHub
parent 08e41ab762
commit a39a311d2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,17 @@ func sendWebhook(webhook *Webhook, record *casvisorsdk.Record, extendedUser *Use
}
}
body = strings.NewReader(util.StructToJson(userMap))
type RecordEx struct {
casvisorsdk.Record
ExtendedUser map[string]interface{} `json:"extendedUser"`
}
recordEx := &RecordEx{
Record: *record,
ExtendedUser: userMap,
}
body = strings.NewReader(util.StructToJson(recordEx))
} else {
type RecordEx struct {
casvisorsdk.Record