slate-api: fixes issue with slate uploads

This commit is contained in:
@wwwjim 2020-08-21 16:25:37 -07:00
parent 0ae9d5a30f
commit 595555ec69

View File

@ -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,
};