IsValidWebhookEventName to validate webhook event name
(eventName string)
| 4 | |
| 5 | // IsValidWebhookEventName to validate webhook event name |
| 6 | func IsValidWebhookEventName(eventName string) bool { |
| 7 | if eventName != constants.UserCreatedWebhookEvent && eventName != constants.UserLoginWebhookEvent && eventName != constants.UserSignUpWebhookEvent && eventName != constants.UserDeletedWebhookEvent && eventName != constants.UserAccessEnabledWebhookEvent && eventName != constants.UserAccessRevokedWebhookEvent && eventName != constants.UserDeactivatedWebhookEvent { |
| 8 | return false |
| 9 | } |
| 10 | |
| 11 | return true |
| 12 | } |
no outgoing calls
no test coverage detected