From 15200de880a5def4adabfe5277ccd8284bf68782 Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 8 Jan 2023 08:59:12 -0800 Subject: [PATCH] fix inspector (#99) --- packages/inspector/hooks/useLocalRender.tsx | 2 +- packages/inspector/pages/api/render.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/inspector/hooks/useLocalRender.tsx b/packages/inspector/hooks/useLocalRender.tsx index fa244df..1b9a51c 100644 --- a/packages/inspector/hooks/useLocalRender.tsx +++ b/packages/inspector/hooks/useLocalRender.tsx @@ -31,7 +31,7 @@ export const useLocalRender = () => { return setStatus(FetchStatus.UNFETCHED); } - const tokenURI = await response.json(); + const tokenURI = await response.text(); setToken(decodeTokenURI(tokenURI)); setStatus(FetchStatus.FETCHED); diff --git a/packages/inspector/pages/api/render.ts b/packages/inspector/pages/api/render.ts index 06318f8..4e561c1 100644 --- a/packages/inspector/pages/api/render.ts +++ b/packages/inspector/pages/api/render.ts @@ -15,7 +15,7 @@ export default async (request: NextApiRequest, response: NextApiResponse) => return resolve(); } - response.json(JSON.parse(stdout)); + response.send(stdout); resolve(); }) );