MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / postIdentityActions

Method postIdentityActions

identity.go:35–49  ·  view source on GitHub ↗

postIdentityActions performs actions after an identity has been created. It sends the newly created identity to the search index queue and sends a webhook notification.

(_ context.Context, identity *model.Identity)

Source from the content-addressed store, hash-verified

33// postIdentityActions performs actions after an identity has been created.
34// It sends the newly created identity to the search index queue and sends a webhook notification.
35func (l *LedgerForge) postIdentityActions(_ context.Context, identity *model.Identity) {
36 go func() {
37 err := l.queue.queueIndexData(identity.IdentityID, "identities", identity)
38 if err != nil {
39 notification.NotifyError(err)
40 }
41 err = l.SendWebhook(NewWebhook{
42 Event: "identity.created",
43 Payload: identity,
44 })
45 if err != nil {
46 notification.NotifyError(err)
47 }
48 }()
49}
50
51// CreateIdentity creates a new identity in the database.
52//

Callers 1

CreateIdentityMethod · 0.95

Calls 3

SendWebhookMethod · 0.95
NotifyErrorFunction · 0.92
queueIndexDataMethod · 0.80

Tested by

no test coverage detected