From 0ee3f1bc976544c895d5bac1fe16ada92adead4f Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 13 Aug 2024 10:58:59 +0800 Subject: [PATCH] :sparkles: Use capital to deal with links --- .idea/workspace.xml | 52 +++++++++++++++++---------------- pkg/internal/services/tokens.go | 4 +-- settings.toml | 2 ++ 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index fd4c854..edc6821 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,6 +6,8 @@ + + - { + "keyToString": { + "DefaultGoTemplateProperty": "Go File", + "Go Build.Backend.executor": "Run", + "Go 构建.Backend.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.go.formatter.settings.were.checked": "true", + "RunOnceActivity.go.migrated.go.modules.settings": "true", + "RunOnceActivity.go.modules.automatic.dependencies.download": "true", + "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", + "git-widget-placeholder": "master", + "go.import.settings.migrated": "true", + "go.sdk.automatically.set": "true", + "last_opened_file_path": "/Users/littlesheep", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "run.code.analysis.last.selected.profile": "pProject Default", + "settings.editor.selected.configurable": "preferences.pluginManager", + "ts.external.directory.path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/web/node_modules/typescript/lib", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" + "keyToStringList": { + "DatabaseDriversLRU": [ + "postgresql" ] } -}]]> +} diff --git a/pkg/internal/services/tokens.go b/pkg/internal/services/tokens.go index 5ce321d..fed48a4 100644 --- a/pkg/internal/services/tokens.go +++ b/pkg/internal/services/tokens.go @@ -92,7 +92,7 @@ func NotifyMagicToken(token models.MagicToken) error { var content string switch token.Type { case models.ConfirmMagicToken: - link := fmt.Sprintf("https://%s/flow/confirm?code=%s", viper.GetString("domain"), token.Code) + link := fmt.Sprintf("%s/flow/accounts/confirm?code=%s", viper.GetString("frontend_app"), token.Code) subject = fmt.Sprintf("[%s] Confirm your registration", viper.GetString("name")) content = fmt.Sprintf( ConfirmRegistrationTemplate, @@ -103,7 +103,7 @@ func NotifyMagicToken(token models.MagicToken) error { viper.GetString("maintainer"), ) case models.ResetPasswordMagicToken: - link := fmt.Sprintf("https://%s/flow/password-reset?code=%s", viper.GetString("domain"), token.Code) + link := fmt.Sprintf("%s/flow/accounts/password-reset?code=%s", viper.GetString("frontend_app"), token.Code) subject = fmt.Sprintf("[%s] Reset your password", viper.GetString("name")) content = fmt.Sprintf( ResetPasswordTemplate, diff --git a/settings.toml b/settings.toml index ace5b52..83d3574 100644 --- a/settings.toml +++ b/settings.toml @@ -5,6 +5,8 @@ bind = "0.0.0.0:8444" grpc_bind = "0.0.0.0:7444" domain = "localhost" +frontend_app = "https://solsynth.dev" + domain = "id.solsynth.dev" content_endpoint = "https://usercontent.solsynth.dev"