switch to json encoding

This commit is contained in:
andrzej 2024-05-29 12:18:01 +02:00
parent a45d836afe
commit eda82a7bf1
2 changed files with 2 additions and 2 deletions

2
dist/index.mjs vendored
View File

@ -10,7 +10,7 @@ mongoose.connection.on('error', error => console.log(error));
mongoose.Promise = global.Promise;
const app = express();
app.use(passport.initialize());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use("/", routes);
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);
// Handle errors.

View File

@ -14,7 +14,7 @@ mongoose.Promise = global.Promise;
const app = express()
app.use(passport.initialize())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
app.use("/", routes)
app.use('/user', passport.authenticate('jwt', { session: false }), secureRoute);