diff --git a/bin/server.js b/bin/server.js index 9ad04a8..394af07 100644 --- a/bin/server.js +++ b/bin/server.js @@ -17,6 +17,7 @@ app.use(cors()); app.use(wwwRedirectMiddleware); app.use(authMiddleware); app.use(apiLimitsMiddleware); +app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded // Initialize the controllers @@ -37,4 +38,4 @@ if (!process.env.GRUNTED) { }); } -module.exports = app; \ No newline at end of file +module.exports = app; diff --git a/lib/server/controllers/apiController.js b/lib/server/controllers/apiController.js index 952932d..765f490 100644 --- a/lib/server/controllers/apiController.js +++ b/lib/server/controllers/apiController.js @@ -8,7 +8,6 @@ var RunsDatastore = require('../datastores/runsDatastore'); var ResultsDatastore = require('../datastores/resultsDatastore'); var serverSettings = require('../../../server_config/settings.json'); - var ApiController = function(app) { 'use strict'; @@ -16,8 +15,6 @@ var ApiController = function(app) { var runsDatastore = new RunsDatastore(); var resultsDatastore = new ResultsDatastore(); - - // Create a new run app.post('/api/runs', function(req, res) { @@ -330,4 +327,4 @@ var ApiController = function(app) { }; -module.exports = ApiController; \ No newline at end of file +module.exports = ApiController;