1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.useTour = useTour;
|
7 |
|
8 | var _bodyParser = require('body-parser');
|
9 |
|
10 | var _bodyParser2 = _interopRequireDefault(_bodyParser);
|
11 |
|
12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13 |
|
14 | function useTour(app, config) {
|
15 |
|
16 | var email = config.email,
|
17 | localAuthenticateAndRedirect = config.localAuthenticateAndRedirect,
|
18 | password = config.password,
|
19 | returnTo = config.returnTo,
|
20 | routePath = config.routePath;
|
21 |
|
22 |
|
23 | app.use(_bodyParser2.default.json());
|
24 |
|
25 | app.post(routePath, function (req, res, next) {
|
26 | req.body.email = email;
|
27 | req.body.password = password;
|
28 | next();
|
29 | }, returnTo, localAuthenticateAndRedirect);
|
30 | } |
\ | No newline at end of file |