2016-05-17 19:50:37 +00:00
|
|
|
import { Router } from 'express';
|
|
|
|
import * as UserController from '../controllers/user.controller';
|
2018-01-09 20:57:49 +00:00
|
|
|
import isAuthenticated from '../utils/isAuthenticated';
|
2017-02-22 19:29:35 +00:00
|
|
|
|
2016-05-17 19:50:37 +00:00
|
|
|
const router = new Router();
|
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.post('/signup', UserController.createUser);
|
2016-06-09 00:52:59 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.get('/signup/duplicate_check', UserController.duplicateUserCheck);
|
2016-09-02 18:51:30 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.put('/preferences', isAuthenticated, UserController.updatePreferences);
|
2016-08-05 01:43:13 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.post('/reset-password', UserController.resetPasswordInitiate);
|
2016-10-12 18:25:24 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.get('/reset-password/:token', UserController.validateResetPasswordToken);
|
2016-10-18 20:07:25 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.post('/reset-password/:token', UserController.updatePassword);
|
2016-10-18 20:07:25 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.put('/account', isAuthenticated, UserController.updateSettings);
|
2017-03-16 22:25:12 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.post('/verify/send', UserController.emailVerificationInitiate);
|
2017-06-26 16:48:28 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.get('/verify', UserController.verifyEmail);
|
2017-06-26 16:48:28 +00:00
|
|
|
|
2016-05-17 19:50:37 +00:00
|
|
|
export default router;
|