spee.ch/server/routes/auth/index.js

13 lines
631 B
JavaScript
Raw Normal View History

2018-04-18 21:01:26 +02:00
const speechPassport = require('../../speechPassport');
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
module.exports = {
'/signup': { method: 'post', controller: [ speechPassport.authenticate('local-signup'), handleSignupRequest ] },
2018-11-11 01:11:12 +01:00
'/auth' : { method: 'post', controller: handleLoginRequest },
'/logout': { controller: handleLogoutRequest },
2018-11-11 01:11:12 +01:00
'/user' : { controller: handleUserRequest },
2018-03-29 07:06:08 +02:00
};