2022-07-17 12:32:01 +05:30
|
|
|
package validators
|
|
|
|
|
|
|
|
import "github.com/authorizerdev/authorizer/server/constants"
|
|
|
|
|
|
|
|
// IsValidEmailTemplateEventName function to validate email template events
|
|
|
|
func IsValidEmailTemplateEventName(eventName string) bool {
|
2022-08-09 09:07:47 +05:30
|
|
|
if eventName != constants.VerificationTypeBasicAuthSignup && eventName != constants.VerificationTypeForgotPassword && eventName != constants.VerificationTypeMagicLinkLogin && eventName != constants.VerificationTypeUpdateEmail && eventName != constants.VerificationTypeOTP && eventName != constants.VerificationTypeInviteMember {
|
2022-07-17 12:32:01 +05:30
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|