Skip to content

Commit a23c56e

Browse files
committed
fixed typo
1 parent f9f8687 commit a23c56e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pkg/internal/persona/event.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
type EventType string
1212

1313
const (
14-
EventTypeAccountCreate = EventType("account.created")
15-
EventTypeInquiryCreate = EventType("inquiry.created")
14+
EventTypeAccountCreated = EventType("account.created")
15+
EventTypeInquiryCreated = EventType("inquiry.created")
1616
EventTypeInquiryStarted = EventType("inquiry.started")
1717
EventTypeInquiryCompleted = EventType("inquiry.completed")
18-
EventyTypeVerificationCreate = EventType("verification.create")
18+
EventTypeVerificationCreated = EventType("verification.created")
1919
EventTypeVerificationPassed = EventType("verification.passed")
2020
EventTypeVerificationFailed = EventType("verification.failed")
2121
)
@@ -47,21 +47,21 @@ func (a EventAttributes) GetType() EventType {
4747

4848
func (a EventAttributes) GetPayloadData() (PayloadData, error) {
4949
switch a.GetType() {
50-
case EventTypeAccountCreate:
50+
case EventTypeAccountCreated:
5151
var data Account
5252
err := json.Unmarshal(a.Payload.Data, &data)
5353
if err != nil {
5454
return nil, common.StringError(err)
5555
}
5656
return data, nil
57-
case EventTypeInquiryCreate, EventTypeInquiryStarted, EventTypeInquiryCompleted:
57+
case EventTypeInquiryCreated, EventTypeInquiryStarted, EventTypeInquiryCompleted:
5858
var data Inquiry
5959
err := json.Unmarshal(a.Payload.Data, &data)
6060
if err != nil {
6161
return nil, common.StringError(err)
6262
}
6363
return data, nil
64-
case EventyTypeVerificationCreate, EventTypeVerificationPassed, EventTypeVerificationFailed:
64+
case EventTypeVerificationCreated, EventTypeVerificationPassed, EventTypeVerificationFailed:
6565
var data Verification
6666
err := json.Unmarshal(a.Payload.Data, &data)
6767
if err != nil {

pkg/service/persona_webhook.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ func (p personaWebhook) processEvent(ctx context.Context, event persona.Event) e
2828
return common.StringError(errors.Newf("error getting payload data: %v", err))
2929
}
3030
switch event.Attributes.Name {
31-
case persona.EventTypeAccountCreate:
31+
case persona.EventTypeAccountCreated:
3232
return p.account(ctx, payload, event.Attributes.Name)
33-
case persona.EventTypeInquiryCreate, persona.EventTypeInquiryStarted, persona.EventTypeInquiryCompleted:
33+
case persona.EventTypeInquiryCreated, persona.EventTypeInquiryStarted, persona.EventTypeInquiryCompleted:
3434
return p.inquiry(ctx, payload, event.Attributes.Name)
35-
case persona.EventyTypeVerificationCreate, persona.EventTypeVerificationPassed, persona.EventTypeVerificationFailed:
35+
case persona.EventTypeVerificationCreated, persona.EventTypeVerificationPassed, persona.EventTypeVerificationFailed:
3636
return p.verification(ctx, payload, event.Attributes.Name)
3737
default:
3838
return common.StringError(errors.Newf("unknown event type: %s", event.Attributes.Name))

0 commit comments

Comments
 (0)