paths in mail
This commit is contained in:
@@ -43,6 +43,9 @@ pub fn router(
|
||||
|
||||
Router::new()
|
||||
.route("/", get(home))
|
||||
.route("/auth/confirm/{token}", get(home))
|
||||
.route("/auth/reset-password/{token}", get(home))
|
||||
.route("/auth/account-action/{token}", get(home))
|
||||
.route("/p/{slug}", get(pad))
|
||||
.route("/s/{token}", get(public_page))
|
||||
.route("/w/{workspace_slug}", get(workspace))
|
||||
|
||||
+3
-3
@@ -883,7 +883,7 @@ async fn send_account_action(
|
||||
token: &str,
|
||||
) -> Result<(), AuthError> {
|
||||
let site = smtp.public_url.trim_end_matches('/');
|
||||
let url = format!("{site}/?account_action_token={token}");
|
||||
let url = format!("{site}/auth/account-action/{token}");
|
||||
let sender = smtp
|
||||
.from
|
||||
.parse::<Mailbox>()
|
||||
@@ -1954,7 +1954,7 @@ async fn send_registration_email(
|
||||
|
||||
let message = match token {
|
||||
Some(token) => {
|
||||
let confirmation_url = format!("{site}/?confirm_token={token}");
|
||||
let confirmation_url = format!("{site}/auth/confirm/{token}");
|
||||
let subject = "Confirm your RustPad account";
|
||||
let text_body = format!(
|
||||
"Hello {},\n\nYour RustPad account has been created.\nNickname: {}\nSite: {}\n\nConfirm the account within 24 hours by opening this link:\n{}\n",
|
||||
@@ -2142,7 +2142,7 @@ async fn send_message(smtp: &SmtpConfig, message: Message, label: &str) -> Resul
|
||||
|
||||
async fn send_reset(smtp: &SmtpConfig, user: &User, token: &str) -> Result<(), AuthError> {
|
||||
let site = smtp.public_url.trim_end_matches('/');
|
||||
let reset_url = format!("{site}/?reset_token={token}");
|
||||
let reset_url = format!("{site}/auth/reset-password/{token}");
|
||||
let sender = smtp
|
||||
.from
|
||||
.parse::<Mailbox>()
|
||||
|
||||
Reference in New Issue
Block a user