Skip to content

Commit

Permalink
Merge pull request #51 from mitchwadair/development
Browse files Browse the repository at this point in the history
Update node modules
  • Loading branch information
mitchwadair committed Apr 6, 2021
2 parents 205ece0 + 7611832 commit 581b9a2
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 750 deletions.
13 changes: 2 additions & 11 deletions API Server/apiserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,8 @@ module.exports = function(actions) {
}
}
}

// use express.json for body parsing
const unless = (path, middleware) => {
return (req, res, next) => {
if (path === req.path)
return next();
else
return middleware(req, res, next);
}
}
server.use(unless('/teswh/event', express.json()));

server.use(express.json());

server.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
Expand Down
Loading

0 comments on commit 581b9a2

Please sign in to comment.