feat: Implement webhook logic along with new entry typeform trigger
This commit is contained in:
@@ -2,7 +2,6 @@ import createError from 'http-errors';
|
||||
import express, { Request, Response, NextFunction } from 'express';
|
||||
import cors from 'cors';
|
||||
import corsOptions from './config/cors-options';
|
||||
import graphQLInstance from './helpers/graphql-instance';
|
||||
import morgan from './helpers/morgan';
|
||||
import appAssetsHandler from './helpers/app-assets-handler';
|
||||
import webUIHandler from './helpers/web-ui-handler';
|
||||
@@ -13,6 +12,8 @@ import {
|
||||
serverAdapter,
|
||||
} from './helpers/create-bull-board-handler';
|
||||
import injectBullBoardHandler from './helpers/inject-bull-board-handler';
|
||||
import router from './routes';
|
||||
import { IRequest } from '@automatisch/types';
|
||||
|
||||
createBullBoardHandler(serverAdapter);
|
||||
|
||||
@@ -23,10 +24,16 @@ injectBullBoardHandler(app, serverAdapter);
|
||||
appAssetsHandler(app);
|
||||
|
||||
app.use(morgan);
|
||||
app.use(express.json());
|
||||
app.use(
|
||||
express.json({
|
||||
verify: (req, res, buf) => {
|
||||
(req as IRequest).rawBody = buf;
|
||||
},
|
||||
})
|
||||
);
|
||||
app.use(express.urlencoded({ extended: false }));
|
||||
app.use(cors(corsOptions));
|
||||
app.use('/graphql', graphQLInstance);
|
||||
app.use('/', router);
|
||||
|
||||
webUIHandler(app);
|
||||
|
||||
|
Reference in New Issue
Block a user