feat(mailer): Add logging for selfservice forgotten mail requests
This commit is contained in:
parent
284954d064
commit
eebcc2e328
@ -76,6 +76,21 @@ export class Mailer {
|
|||||||
*/
|
*/
|
||||||
public static async sendSelfserviceForgottenMail(to_address: string, runner_id: number, firstname: string, middlename: string, lastname: string, token: string, locale: string = "en") {
|
public static async sendSelfserviceForgottenMail(to_address: string, runner_id: number, firstname: string, middlename: string, lastname: string, token: string, locale: string = "en") {
|
||||||
try {
|
try {
|
||||||
|
console.log("Mail request", {
|
||||||
|
to: to_address,
|
||||||
|
templateName: 'welcome',
|
||||||
|
language: locale,
|
||||||
|
data: {
|
||||||
|
to: to_address,
|
||||||
|
templateName: 'welcome',
|
||||||
|
language: locale,
|
||||||
|
data: {
|
||||||
|
name: `${firstname} ${middlename} ${lastname}`,
|
||||||
|
barcode_content: `${runner_id}`,
|
||||||
|
link: `${process.env.SELFSERVICE_URL}/profile/${token}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
await axios.request({
|
await axios.request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: `${Mailer.base}/api/v1/email`,
|
url: `${Mailer.base}/api/v1/email`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user