From 17fe8f34b7998a49622176e20d1305122cd83741 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 13 Apr 2023 14:47:02 +0530 Subject: [PATCH] fix: define handlebar json extension Signed-off-by: Pranav C --- packages/nocodb-nest/src/helpers/webhookHelpers.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb-nest/src/helpers/webhookHelpers.ts b/packages/nocodb-nest/src/helpers/webhookHelpers.ts index 744e420d1a..d259a3e646 100644 --- a/packages/nocodb-nest/src/helpers/webhookHelpers.ts +++ b/packages/nocodb-nest/src/helpers/webhookHelpers.ts @@ -5,6 +5,10 @@ import NcPluginMgrv2 from './NcPluginMgrv2'; import type { Column, FormView, Hook, Model, View } from '../models'; import type { HookLogType } from 'nocodb-sdk'; +Handlebars.registerHelper('json', function (context) { + return JSON.stringify(context); +}); + export function parseBody(template: string, data: any): string { if (!template) { return template;