1
0
mirror of https://gitlab.com/ceda_ei/git-alerts-bot synced 2025-11-05 06:40:06 +01:00

[refactor] /util to /strategies

This commit is contained in:
Muthu Kumar
2018-11-27 22:36:29 +05:30
parent 1199d4e20d
commit abf043a27a
9 changed files with 54 additions and 52 deletions

View File

@@ -1,10 +0,0 @@
module.exports = app => {
app.get("/webhook/:provider", (req, res) => {
const strategy = req.params.provider;
const eventType = req.convert.getEvent[strategy](req.body);
});
};

10
server/main.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = app => {
app.get("/webhook/:provider", (req, res) => {
const { provider } = req.params;
const eventType = req.strategies[provider].getEvent(req.body);
});
};