Skip to content

Commit a39a311

Browse files
authored
feat: fix webhook bug in RecordEx JSON (casdoor#3642)
1 parent 08e41ab commit a39a311

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

object/webhook_util.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@ func sendWebhook(webhook *Webhook, record *casvisorsdk.Record, extendedUser *Use
4040
}
4141
}
4242

43-
body = strings.NewReader(util.StructToJson(userMap))
43+
type RecordEx struct {
44+
casvisorsdk.Record
45+
ExtendedUser map[string]interface{} `json:"extendedUser"`
46+
}
47+
48+
recordEx := &RecordEx{
49+
Record: *record,
50+
ExtendedUser: userMap,
51+
}
52+
53+
body = strings.NewReader(util.StructToJson(recordEx))
4454
} else {
4555
type RecordEx struct {
4656
casvisorsdk.Record

0 commit comments

Comments
 (0)