authorizer/server/validators/email_template.go

13 lines
583 B
Go
Raw Permalink Normal View History

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