fix: remove notify option VerifyEmailUrlPath

This commit is contained in:
Qiu Jian
2020-04-15 23:02:59 +08:00
parent 1284538005
commit 068ea26c8d
2 changed files with 10 additions and 6 deletions
+6 -2
View File
@@ -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
}
+4 -4
View File
@@ -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"`