mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
oh im stupid
This commit is contained in:
parent
4a2b0633f2
commit
2ebc50a312
|
@ -49,10 +49,11 @@ adminRoutes.post("/reset", parser, (req,res) => {
|
|||
auth.invalidate(v.token)
|
||||
})
|
||||
|
||||
|
||||
sendMail(req.body.email, `Your login details have been updated`, `<b>Hello there!</b> This email is to notify you of a password change that an administrator, <span username>${acc.username}</span>, has initiated. You have been logged out of your devices. Thank you for using monofile.`).then(() => {
|
||||
if (targetAccount.email) {
|
||||
sendMail(targetAccount.email, `Your login details have been updated`, `<b>Hello there!</b> This email is to notify you of a password change that an administrator, <span username>${acc.username}</span>, has initiated. You have been logged out of your devices. Thank you for using monofile.`).then(() => {
|
||||
res.send("OK")
|
||||
}).catch((err) => {})
|
||||
}
|
||||
|
||||
|
||||
res.send()
|
||||
|
|
|
@ -240,9 +240,11 @@ authRoutes.post("/change_username", requiresAccount, parser, (req,res) => {
|
|||
acc.username = req.body.username
|
||||
Accounts.save()
|
||||
|
||||
sendMail(req.body.email, `Your login details have been updated`, `<b>Hello there!</b> Your username has been updated to <span username>${req.body.username}</span>. Please update your devices accordingly. Thank you for using monofile.`).then(() => {
|
||||
if (acc.email) {
|
||||
sendMail(acc.email, `Your login details have been updated`, `<b>Hello there!</b> Your username has been updated to <span username>${req.body.username}</span>. Please update your devices accordingly. Thank you for using monofile.`).then(() => {
|
||||
res.send("OK")
|
||||
}).catch((err) => {})
|
||||
}
|
||||
|
||||
res.send("username changed")
|
||||
})
|
||||
|
@ -407,9 +409,11 @@ authRoutes.post("/change_password", requiresAccount, parser, (req,res) => {
|
|||
auth.invalidate(v.token)
|
||||
})
|
||||
|
||||
sendMail(req.body.email, `Your login details have been updated`, `<b>Hello there!</b> This email is to notify you of a password change that you have initiated. You have been logged out of your devices. Thank you for using monofile.`).then(() => {
|
||||
if (acc.email) {
|
||||
sendMail(acc.email, `Your login details have been updated`, `<b>Hello there!</b> This email is to notify you of a password change that you have initiated. You have been logged out of your devices. Thank you for using monofile.`).then(() => {
|
||||
res.send("OK")
|
||||
}).catch((err) => {})
|
||||
}
|
||||
|
||||
res.send("password changed - logged out all sessions")
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue