2018-04-18 21:01:26 +02:00
|
|
|
const speechPassport = require('../../speechPassport');
|
2018-04-27 08:42:22 +02: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-29 07:06:08 +02:00
|
|
|
|
2018-03-29 20:40:47 +02:00
|
|
|
module.exports = (app) => {
|
|
|
|
app.post('/signup', speechPassport.authenticate('local-signup'), handleSignupRequest);
|
|
|
|
app.post('/login', handleLoginRequest);
|
|
|
|
app.get('/logout', handleLogoutRequest);
|
|
|
|
app.get('/user', handleUserRequest);
|
2018-03-29 07:06:08 +02:00
|
|
|
};
|