Skip to content

Commit

Permalink
refactor getIPFDContent
Browse files Browse the repository at this point in the history
  • Loading branch information
MixailE committed Oct 4, 2023
1 parent 33cc4af commit 13b833c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers/getIPFSContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default async function (cid?: string) {
if (!cid) return
const ipfsBaseUrl = env.IPFS_GATEWAY
const ipfsUrlString = `${ipfsBaseUrl}/${cid}`
const ipfsContent = (
await axios.get<{ text?: string; extraText?: string }>(ipfsUrlString)
).data
return ipfsContent
const { data } = await axios.get<{ text?: string; extraText?: string }>(
ipfsUrlString
)
return data
}

0 comments on commit 13b833c

Please sign in to comment.