p5.js-web-editor/server/routes/user.routes.js
Yining Shi fe6acc90e4 Adding User Settings View (#325)
* added account page showing username and email

* change username and email

* validate current password and add new  password

* reject promise with error for reduxForm submit-validation for current password

* updated user reducer to handle setting sucess and server side async

* warning if there is current password but no new password

* fixes logout button

* import validate function, fixes logout style
2017-03-16 18:25:12 -04:00

20 lines
666 B
JavaScript

import { Router } from 'express';
import * as UserController from '../controllers/user.controller';
const router = new Router();
router.route('/signup').post(UserController.createUser);
router.route('/signup/duplicate_check').get(UserController.duplicateUserCheck);
router.route('/preferences').put(UserController.updatePreferences);
router.route('/reset-password').post(UserController.resetPasswordInitiate);
router.route('/reset-password/:token').get(UserController.validateResetPasswordToken);
router.route('/reset-password/:token').post(UserController.updatePassword);
router.route('/account').put(UserController.updateSettings);
export default router;