switch to json encoding
This commit is contained in:
parent
a45d836afe
commit
eda82a7bf1
|
@ -10,7 +10,7 @@ mongoose.connection.on('error', error => console.log(error));
|
||||||
mongoose.Promise = global.Promise;
|
mongoose.Promise = global.Promise;
|
||||||
const app = express();
|
const app = express();
|
||||||
app.use(passport.initialize());
|
app.use(passport.initialize());
|
||||||
app.use(bodyParser.urlencoded({ extended: false }));
|
app.use(bodyParser.json());
|
||||||
app.use("/", routes);
|
app.use("/", routes);
|
||||||
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);
|
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);
|
||||||
// Handle errors.
|
// Handle errors.
|
||||||
|
|
|
@ -14,7 +14,7 @@ mongoose.Promise = global.Promise;
|
||||||
const app = express()
|
const app = express()
|
||||||
app.use(passport.initialize())
|
app.use(passport.initialize())
|
||||||
|
|
||||||
app.use(bodyParser.urlencoded({ extended: false }))
|
app.use(bodyParser.json())
|
||||||
app.use("/", routes)
|
app.use("/", routes)
|
||||||
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);
|
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue