From 595555ec697cf5d0f56437d483f308b5eef8da74 Mon Sep 17 00:00:00 2001 From: "@wwwjim" Date: Fri, 21 Aug 2020 16:25:37 -0700 Subject: [PATCH] slate-api: fixes issue with slate uploads --- pages/api/v1/upload-data/[id].js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/api/v1/upload-data/[id].js b/pages/api/v1/upload-data/[id].js index 2d8b1bc6..fb1fe38f 100644 --- a/pages/api/v1/upload-data/[id].js +++ b/pages/api/v1/upload-data/[id].js @@ -67,7 +67,9 @@ export default async (req, res) => { }); if (!uploadResponse) { - return res.status(404).send({ decorator: "V1_SERVER_API_UPLOAD_ERROR", error: true }); + return res + .status(404) + .send({ decorator: "V1_SERVER_API_UPLOAD_ERROR", error: true }); } if (uploadResponse.error) { @@ -114,8 +116,9 @@ export default async (req, res) => { const url = `https://hub.textile.io${updatedData.ipfs}`; const newSlateObjectEntity = { id: updatedData.id, - ownerId: user.id, name: updatedData.name, + type: updatedData.type, + ownerId: user.id, url, };