Fix admin/user login issues

This commit is contained in:
John Lyon-Smith
2018-05-25 10:16:28 -07:00
parent a33ca57d58
commit 587052a509
22 changed files with 255 additions and 92 deletions

View File

@@ -19,6 +19,8 @@ export class UserRoutes {
this.ws = container.ws
this.maxEmailTokenAgeInHours = config.get("email.maxEmailTokenAgeInHours")
this.sendEmail = config.get("email.sendEmail")
this.emailServiceName = config.get("serviceName.email")
app
.route("/users")
.get(
@@ -164,7 +166,7 @@ export class UserRoutes {
res.json(savedUser.toClient())
if (this.sendEmail) {
await this.mq.request("dar-email", "sendEmail", msg)
await this.mq.request(this.emailServiceName, "sendEmail", msg)
}
}
@@ -244,7 +246,7 @@ export class UserRoutes {
res.json({})
if (this.sendEmail) {
await this.mq.request("dar-email", "sendEmail", msg)
await this.mq.request(this.emailServiceName, "sendEmail", msg)
}
}
}