From 09181063287c792402f9178315f619e54c8bf6d1 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 14 Dec 2020 15:09:41 +0100 Subject: [PATCH] :zap: Make it possible to return string via Webhook-Node --- packages/cli/src/ResponseHelper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ResponseHelper.ts b/packages/cli/src/ResponseHelper.ts index d09011eac0..4458316dcf 100644 --- a/packages/cli/src/ResponseHelper.ts +++ b/packages/cli/src/ResponseHelper.ts @@ -64,7 +64,11 @@ export function sendSuccessResponse(res: Response, data: any, raw?: boolean, res } if (raw === true) { - res.json(data); + if (typeof data === 'string') { + res.send(data); + } else { + res.json(data); + } } else { res.json({ data,