summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/index.js4
-rw-r--r--server/lib/auth/views.js2
-rw-r--r--server/lib/util.js2
3 files changed, 4 insertions, 4 deletions
diff --git a/server/index.js b/server/index.js
index 4b628e4..1db7e04 100644
--- a/server/index.js
+++ b/server/index.js
@@ -92,8 +92,8 @@ site.route = function () {
app.post('/auth/usernameTaken', auth.usernameFixed);
app.get('/auth/password', auth.views.resetPassword);
app.post('/auth/password', auth.resetPassword);
- app.post('/auth/passwordForgot', auth.forgotPassword);
-
+ app.get('/auth/forgotPassword', views.modal);
+ app.post('/auth/forgotPassword', auth.forgotPassword);
app.get('/profile', views.profile)
app.get('/profile/edit', views.profile)
diff --git a/server/lib/auth/views.js b/server/lib/auth/views.js
index 591b06a..cd31248 100644
--- a/server/lib/auth/views.js
+++ b/server/lib/auth/views.js
@@ -26,7 +26,7 @@ views.resetPassword = function (req, res) {
if (err || ! user) {
return res.redirect("/")
}
- res.render("reset-password", { username: user.username, nonce: user.passwordNonce })
+ res.render("modal", { opt: { username: user.username, nonce: user.passwordNonce } })
})
}
diff --git a/server/lib/util.js b/server/lib/util.js
index 6604abe..87e2d54 100644
--- a/server/lib/util.js
+++ b/server/lib/util.js
@@ -25,7 +25,7 @@ util.capitalize = function (s) {
util.capitalizeWord = function (s) {
return s.charAt(0).toUpperCase() + s.slice(1);
}
-util.escapeRegExp: function (s) {
+util.escapeRegExp = function (s) {
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
}