From 05a44afbd86163009e540d84a4a5ffa372fe570c Mon Sep 17 00:00:00 2001 From: lethe Date: Fri, 19 May 2023 18:45:09 +0800 Subject: [PATCH] Feat: just post an empty body when on generate code is fired Since UI for specify code value is absent, just call this api with empty json body to avoid bad request error --- .../app/(appDetailLayout)/[appId]/overview/cardView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx index ff9388e147..21f1074d33 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/cardView.tsx @@ -61,7 +61,7 @@ const CardView: FC = ({ appId }) => { } const onGenerateCode = async () => { - const [err] = await asyncRunSafe(updateAppSiteAccessToken as any, { url: `/apps/${appId}/site/access-token-reset` }, notify, t) + const [err] = await asyncRunSafe(updateAppSiteAccessToken as any, { url: `/apps/${appId}/site/access-token-reset`, body: {} }, notify, t) if (!err) mutate(detailParams) }