[Draft] Implement Reviewer Notice Link using Login Redirect #40
3 changed files with 8 additions and 2 deletions
fix too much escaping
commit
a24f8ca7ee
|
|
@ -6,7 +6,7 @@ use handlebars::Handlebars;
|
|||
use lettre::message::header::{Header, HeaderName, HeaderValue, UserAgent};
|
||||
use lettre::message::{Mailbox, SinglePart};
|
||||
use lettre::{Address, AsyncTransport};
|
||||
use log::warn;
|
||||
use log::{warn, debug};
|
||||
use serde_json::json;
|
||||
use url::Url;
|
||||
|
||||
|
|
@ -78,6 +78,8 @@ pub(crate) async fn send_reviewer_notice(
|
|||
.query_pairs_mut()
|
||||
.append_pair(RETURN_TO, highlight_url.as_str());
|
||||
|
||||
debug!("Url:\n{login_url}");
|
||||
|
||||
let body = match hb.render(
|
||||
template::EMAIL_REVIEWER_NOTICE,
|
||||
&json!({ "highlight_link": login_url }),
|
||||
|
|
@ -89,6 +91,8 @@ pub(crate) async fn send_reviewer_notice(
|
|||
}
|
||||
};
|
||||
|
||||
debug!("Sending:\n{body}");
|
||||
|
||||
let message = lettre::Message::builder()
|
||||
.from(email_config.from.to_owned())
|
||||
.to(email_config.from.to_owned())
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Automatischer Hinweis: Eine neue Stellenausschreibung wurde zur Jobbörse eingereicht!
|
||||
|
||||
{{highlight_link}}
|
||||
{{{highlight_link}}}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ RUN_DIR="${DIR}/../packages/jobboerse"
|
|||
|
||||
pushd "${RUN_DIR}"
|
||||
|
||||
export RUST_LOG=debug
|
||||
|
||||
cargo watch \
|
||||
-i ./packages/jobboerse/config/dev-config.toml \
|
||||
-x "run --package jobboerse --bin jobboerse --release --features=dev_mode -- --config=\"${CFG}\" --mode=development"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue