2018-04-18 12:01:26 -07:00
|
|
|
const speechPassport = require('../../speechPassport');
|
2018-04-26 23:42:22 -07:00
|
|
|
const handleSignupRequest = require('../../controllers/auth/signup');
|
|
|
|
const handleLoginRequest = require('../../controllers/auth/login');
|
|
|
|
const handleLogoutRequest = require('../../controllers/auth/logout');
|
|
|
|
const handleUserRequest = require('../../controllers/auth/user');
|
2018-03-28 22:06:08 -07:00
|
|
|
|
2018-09-27 22:56:10 -05:00
|
|
|
module.exports = {
|
|
|
|
'/signup': { method: 'post', controller: [ speechPassport.authenticate('local-signup'), handleSignupRequest ] },
|
|
|
|
'/login': { method: 'post', controller: handleLoginRequest },
|
|
|
|
'/logout': { controller: handleLogoutRequest },
|
|
|
|
'/user': { controller: handleUserRequest },
|
2018-03-28 22:06:08 -07:00
|
|
|
};
|