diff --git a/components/api-docs/v1/get-slate.js b/components/api-docs/v1/get-slate.js index 7f9295c6..c7f5ccf6 100644 --- a/components/api-docs/v1/get-slate.js +++ b/components/api-docs/v1/get-slate.js @@ -22,14 +22,9 @@ if (!response) { return; } -if (!response.ok) { - console.log(response.error); - return response.error; -} - const json = await response.json(); if (json.error) { - console.log(json.error); + console.log(json); } else { const collection = json.slate; }`; diff --git a/components/api-docs/v2/get-slate.js b/components/api-docs/v2/get-slate.js index ddc8379e..8ff219ce 100644 --- a/components/api-docs/v2/get-slate.js +++ b/components/api-docs/v2/get-slate.js @@ -22,14 +22,9 @@ if (!response) { return; } -if (!response.ok) { - console.log(response.error); - return response.error; -} - const json = await response.json(); if (json.error) { - console.log(json.error); + console.log(json); } else { const collection = json.collection; }`; diff --git a/components/api-docs/v2/get-user.js b/components/api-docs/v2/get-user.js index cb530752..3d0771a9 100644 --- a/components/api-docs/v2/get-user.js +++ b/components/api-docs/v2/get-user.js @@ -22,14 +22,9 @@ if (!response) { return; } -if (!response.ok) { - console.log(response.error); - return response.error; -} - const json = await response.json(); if (json.error) { - console.log(json.error); + console.log(json); } else { const user = json.user; }`; diff --git a/components/api-docs/v2/get.js b/components/api-docs/v2/get.js index 823af304..ee1daaaf 100644 --- a/components/api-docs/v2/get.js +++ b/components/api-docs/v2/get.js @@ -16,14 +16,9 @@ if (!response) { return; } -if (!response.ok) { - console.log(response.error); - return response.error; -} - const json = await response.json(); if (json.error) { - console.log(json.error); + console.log(json); } else { const collections = json.collections; const user = json.user; @@ -53,7 +48,7 @@ const EXAMPLE_RESPONSE = ` objects: [ { id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/file-cid" + cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a" filename: "door.jpg", ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", data: { @@ -92,7 +87,7 @@ const EXAMPLE_RESPONSE = ` library: [ { id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/file-cid" + cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a" filename: "door.jpg", ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", data: {