@@ -241,7 +241,7 @@ func (i SendMessageInput) Validate() error {
241
241
}
242
242
243
243
type RegisterEventTypesInputs struct {
244
- EvenTypes []EventType
244
+ EventTypes []EventType
245
245
AllowUpdate bool
246
246
}
247
247
@@ -271,7 +271,7 @@ const (
271
271
type Config struct {
272
272
SvixConfig
273
273
274
- RegisterEvenTypes []EventType
274
+ RegisterEventTypes []EventType
275
275
RegistrationTimeout time.Duration
276
276
SkipRegistrationOnError bool
277
277
@@ -283,8 +283,8 @@ func New(config Config) (Handler, error) {
283
283
return nil , errors .New ("logger is required" )
284
284
}
285
285
286
- if config .RegisterEvenTypes == nil {
287
- config .RegisterEvenTypes = NotificationEventTypes
286
+ if config .RegisterEventTypes == nil {
287
+ config .RegisterEventTypes = NotificationEventTypes
288
288
}
289
289
290
290
if config .RegistrationTimeout == 0 {
@@ -296,12 +296,12 @@ func New(config Config) (Handler, error) {
296
296
return nil , fmt .Errorf ("failed to initialize Svix webhook handler: %w" , err )
297
297
}
298
298
299
- if len (config .RegisterEvenTypes ) > 0 {
299
+ if len (config .RegisterEventTypes ) > 0 {
300
300
ctx , cancel := context .WithTimeout (context .Background (), config .RegistrationTimeout )
301
301
defer cancel ()
302
302
303
303
err = handler .RegisterEventTypes (ctx , RegisterEventTypesInputs {
304
- EvenTypes : config .RegisterEvenTypes ,
304
+ EventTypes : config .RegisterEventTypes ,
305
305
})
306
306
if err != nil {
307
307
if config .SkipRegistrationOnError {
0 commit comments