Fix admin/user login issues
This commit is contained in:
@@ -25,6 +25,8 @@ export class AuthRoutes {
|
||||
this.sendEmailDelayInSeconds = config.get("email.sendEmailDelayInSeconds")
|
||||
this.supportEmail = config.get("email.supportEmail")
|
||||
this.sendEmail = config.get("email.sendEmail")
|
||||
this.appName = config.get("email.appName")
|
||||
this.emailServiceName = config.get("serviceName.email")
|
||||
app
|
||||
.route("/auth/login")
|
||||
// Used to login. Email must be confirmed.
|
||||
@@ -208,11 +210,12 @@ export class AuthRoutes {
|
||||
siteUrl.host
|
||||
}/confirm-email?email-token%3D${savedUser.emailToken.value}`,
|
||||
supportEmail: this.supportEmail,
|
||||
appName: this.appName,
|
||||
},
|
||||
})
|
||||
|
||||
if (this.sendEmail) {
|
||||
await this.mq.request("dar-email", "sendEmail", msgs)
|
||||
await this.mq.request(this.emailServiceName, "sendEmail", msgs)
|
||||
}
|
||||
|
||||
res.json({})
|
||||
@@ -393,10 +396,11 @@ export class AuthRoutes {
|
||||
siteUrl.host
|
||||
}/reset-password?password-token%3D${savedUser.passwordToken.value}`,
|
||||
supportEmail: this.supportEmail,
|
||||
appName: this.appName,
|
||||
},
|
||||
}
|
||||
if (this.sendEmail) {
|
||||
await this.mq.request("dar-email", "sendEmail", msg)
|
||||
await this.mq.request(this.emailServiceName, "sendEmail", msg)
|
||||
}
|
||||
|
||||
res.json({})
|
||||
|
||||
Reference in New Issue
Block a user