From 8a392170cf770cc7c62a53406b6f223e32f89f62 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 29 Oct 2022 18:43:16 +0800 Subject: [PATCH] =?UTF-8?q?webhook=E9=80=9A=E7=9F=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=B5=8C=E5=A5=97body?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/config/util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/back/config/util.ts b/back/config/util.ts index 222322ef..2ed60963 100644 --- a/back/config/util.ts +++ b/back/config/util.ts @@ -419,7 +419,12 @@ export function parseBody( return; } - parsed[key] = val; + try { + const jsonValue = JSON.parse(val); + parsed[key] = jsonValue; + } catch (error) { + parsed[key] = val; + } }); switch (contentType) {