mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix: remove notify option VerifyEmailUrlPath
This commit is contained in:
@@ -72,9 +72,13 @@ type STemplate struct {
|
||||
Content string `length:"text" nullable:"false" create:"required" get:"user" list:"user" update:"user"`
|
||||
}
|
||||
|
||||
const (
|
||||
verifyUrlPath = "/v2/email-verification/id/{0}/token/{1}?region=%s"
|
||||
)
|
||||
|
||||
func (tm *STemplateManager) GetEmailUrl() string {
|
||||
if len(options.Options.ApiServer) > 0 && len(options.Options.VerifyEmailUrlPath) > 0 {
|
||||
return httputils.JoinPath(options.Options.ApiServer, options.Options.VerifyEmailUrlPath)
|
||||
if len(options.Options.ApiServer) > 0 {
|
||||
return httputils.JoinPath(options.Options.ApiServer, fmt.Sprintf(verifyUrlPath, options.Options.Region))
|
||||
}
|
||||
return options.Options.VerifyEmailUrl
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ type NotifyOption struct {
|
||||
common_options.CommonOptions
|
||||
common_options.DBOptions
|
||||
|
||||
DingtalkEnabled bool `help:"Enable dingtalk"`
|
||||
SocketFileDir string `help:"Socket file directory" default:"/etc/yunion/notify"`
|
||||
UpdateInterval int `help:"Update send services interval(unit:min)" default:"30"`
|
||||
VerifyEmailUrlPath string `help:"url of verify email" json:"verify_email_url_path"`
|
||||
DingtalkEnabled bool `help:"Enable dingtalk"`
|
||||
SocketFileDir string `help:"Socket file directory" default:"/etc/yunion/notify"`
|
||||
UpdateInterval int `help:"Update send services interval(unit:min)" default:"30"`
|
||||
// VerifyEmailUrlPath string `help:"url of verify email" json:"verify_email_url_path"`
|
||||
|
||||
// Deprecated
|
||||
VerifyEmailUrl string `help:"url of verify email" json:"verify_email_url"`
|
||||
|
||||
Reference in New Issue
Block a user