From 6c03ecfecf190464d864a346f1cf3598b7090a43 Mon Sep 17 00:00:00 2001 From: poicicini <62730438+Cicini@users.noreply.github.com> Date: Sat, 1 Oct 2022 18:40:24 +0800 Subject: [PATCH] fix error code 400 bug --- pages/api/link.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/link.ts b/pages/api/link.ts index 8f2a6bf..a5e2afb 100644 --- a/pages/api/link.ts +++ b/pages/api/link.ts @@ -24,6 +24,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { return } - res.status(200).json({ shortUrl: parsed.result.shorturl }) + res.status(200).json({ shortUrl: parsed.root.shorturl }) } export default handler