mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46: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)
|
auth.invalidate(v.token)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (targetAccount.email) {
|
||||||
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(() => {
|
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")
|
res.send("OK")
|
||||||
}).catch((err) => {})
|
}).catch((err) => {})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
res.send()
|
res.send()
|
||||||
|
|
|
@ -240,9 +240,11 @@ authRoutes.post("/change_username", requiresAccount, parser, (req,res) => {
|
||||||
acc.username = req.body.username
|
acc.username = req.body.username
|
||||||
Accounts.save()
|
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")
|
res.send("OK")
|
||||||
}).catch((err) => {})
|
}).catch((err) => {})
|
||||||
|
}
|
||||||
|
|
||||||
res.send("username changed")
|
res.send("username changed")
|
||||||
})
|
})
|
||||||
|
@ -407,9 +409,11 @@ authRoutes.post("/change_password", requiresAccount, parser, (req,res) => {
|
||||||
auth.invalidate(v.token)
|
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")
|
res.send("OK")
|
||||||
}).catch((err) => {})
|
}).catch((err) => {})
|
||||||
|
}
|
||||||
|
|
||||||
res.send("password changed - logged out all sessions")
|
res.send("password changed - logged out all sessions")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue