Skip to content

Commit

Permalink
Update api.service.js
Browse files Browse the repository at this point in the history
  • Loading branch information
FLYBYME authored Sep 15, 2023
1 parent b4c686a commit d84dfcd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions services/api.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ module.exports = {

onBeforeCall(ctx, route, req, res) {
//strip any scope actions from params.
delete ctx.params.scope;
if(ctx.maras)
delete ctx.params.scope;

ctx.meta.userAgent = req.headers["user-agent"];
if(req.headers["X-GitHub-Event"])
ctx.meta.githubEvent = req.headers["X-GitHub-Event"];
if(req.headers["X-Hub-Signature"])
ctx.meta.githubSignature = req.headers["X-Hub-Signature"];
if(req.headers["x-gitHub-event"])
ctx.meta.githubEvent = req.headers["x-gitHub-event"];
if(req.headers["x-hub-signature"])
ctx.meta.githubSignature = req.headers["x-hub-signature"];
},

// Use bodyparser modules
Expand Down

0 comments on commit d84dfcd

Please sign in to comment.