overleaf/services/web/app/coffee/Features/PasswordReset/PasswordResetRouter.coffee

15 lines
760 B
CoffeeScript
Raw Normal View History

PasswordResetController = require("./PasswordResetController")
AuthenticationController = require('../Authentication/AuthenticationController')
2014-05-15 11:20:23 -04:00
module.exports =
apply: (webRouter, apiRouter) ->
2014-05-15 11:20:23 -04:00
webRouter.get '/user/password/reset', PasswordResetController.renderRequestResetForm
webRouter.post '/user/password/reset', PasswordResetController.requestReset
AuthenticationController.addEndpointToLoginWhitelist '/user/password/reset'
2014-05-15 11:20:23 -04:00
webRouter.get '/user/password/set', PasswordResetController.renderSetPasswordForm
webRouter.post '/user/password/set', PasswordResetController.setNewUserPassword
AuthenticationController.addEndpointToLoginWhitelist '/user/password/set'
2014-05-15 11:20:23 -04:00
webRouter.post '/user/reconfirm', PasswordResetController.requestReset