From 8277c3e6dfbb2040a89028e925eca590ad72ae34 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 18 Dec 2023 02:01:47 -0500 Subject: [PATCH] fix: we need to read json, not form data --- app/routes/api.events.siteUpdateReceived.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/routes/api.events.siteUpdateReceived.ts b/app/routes/api.events.siteUpdateReceived.ts index a050058..413ffd7 100644 --- a/app/routes/api.events.siteUpdateReceived.ts +++ b/app/routes/api.events.siteUpdateReceived.ts @@ -14,8 +14,7 @@ import path from "path"; // Action function for POST requests export async function action({ request }: ActionFunctionArgs) { const client = new S5Client("https://s5.web3portal.com"); - const formData = await request.formData(); - const data = Object.fromEntries(formData.entries()); + const data = await request.json(); const meta = (await client.getMetadata(data.cid as string)) as any; const fileMeta = meta.metadata as any; const paths = fileMeta.paths as {