fix(webhook): correct internal ID for GET requests
This commit is contained in:
@@ -45,6 +45,7 @@ export default async (request: IRequest, response: Response) => {
|
|||||||
|
|
||||||
// in case trigger type is 'webhook'
|
// in case trigger type is 'webhook'
|
||||||
let payload = request.body;
|
let payload = request.body;
|
||||||
|
let rawInternalId: string | Buffer = request.rawBody;
|
||||||
|
|
||||||
// in case it's our built-in generic webhook trigger
|
// in case it's our built-in generic webhook trigger
|
||||||
if (isWebhookApp) {
|
if (isWebhookApp) {
|
||||||
@@ -53,12 +54,14 @@ export default async (request: IRequest, response: Response) => {
|
|||||||
body: request.body,
|
body: request.body,
|
||||||
query: request.query,
|
query: request.query,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rawInternalId = JSON.stringify(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
const triggerItem: ITriggerItem = {
|
const triggerItem: ITriggerItem = {
|
||||||
raw: payload,
|
raw: payload,
|
||||||
meta: {
|
meta: {
|
||||||
internalId: await bcrypt.hash(request.rawBody, 1),
|
internalId: await bcrypt.hash(rawInternalId, 1),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user