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)
| 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. |
| 35 | func (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 | // |
no test coverage detected