From 1bb0dfaa3e6faefcb12e753fb1d46394fa771d26 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 15 Mar 2022 22:48:57 -0700 Subject: [PATCH] More fixes for graphql upload flow --- src/upload/uploadUtils.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/upload/uploadUtils.js b/src/upload/uploadUtils.js index aaa6d417..c1ab79fd 100644 --- a/src/upload/uploadUtils.js +++ b/src/upload/uploadUtils.js @@ -112,13 +112,11 @@ export async function checkMd5sUploadStatus(md5s) { } `; const data = await fetchGraphql(query, { md5s }); - return data.upload_statuses_by_md5.map((status) => { - return { - id: status.id, - md5: status.upload_md5, - status: status.status, - }; + const statusObj = {}; + data.upload_statuses_by_md5.forEach((status) => { + statusObj[status.upload_md5] = status.status; }); + return statusObj; } else { const response = await fetch(`${API_URL}/skins/status`, { method: "POST",