Removes slack test api
This commit is contained in:
1 parent
764778b929
commit
a8eaf2589c
5 files changed
-41
No files matched your search
@@ -1,10 +0,0 @@
|
|||||||
import { Router } from "express"
|
|
||||||
import hooks from "./routes/hooks"
|
|
||||||
|
|
||||||
export default (container) => {
|
|
||||||
const app = Router()
|
|
||||||
|
|
||||||
hooks(app)
|
|
||||||
|
|
||||||
return app
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export default (fn) => (...args) => fn(...args).catch(args[2])
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { default as wrap } from "./await-middleware"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
wrap,
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { Router } from "express"
|
|
||||||
import bodyParser from "body-parser"
|
|
||||||
import middlewares from "../../middlewares"
|
|
||||||
|
|
||||||
const route = Router()
|
|
||||||
|
|
||||||
export default (app) => {
|
|
||||||
app.use("/hooks", route)
|
|
||||||
|
|
||||||
route.post("/slack", middlewares.wrap(require("./slack").default))
|
|
||||||
|
|
||||||
return app
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
export default async (req, res) => {
|
|
||||||
try {
|
|
||||||
const slackService = req.scope.resolve("slackService")
|
|
||||||
|
|
||||||
await slackService.orderNotification("5eff28187fde3440fd15ab49")
|
|
||||||
|
|
||||||
res.sendStatus(200)
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
res.status(400).send(`Webhook error: ${error.message}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user