Skip to content

Commit 72d378f

Browse files
authored
Update node-js.mdx to handle proper fetch, previous one was causing an error
The current of the version provides the following code to fetch data ``` const file = await pinata.gateways.get("bafkreiac3t35fklpiwqonav2vj4x2dh6x2zugkdu7dsh6zkaq5jr33lcwy") ``` but, `pinata.gateways.get()` is not a valid function and it should be `pinata.gateways.public.get("CID_URL")`
1 parent 97d87ca commit 72d378f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frameworks/node-js.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const pinata = new PinataSDK({
144144

145145
async function main() {
146146
try {
147-
const file = await pinata.gateways.get("bafkreiac3t35fklpiwqonav2vj4x2dh6x2zugkdu7dsh6zkaq5jr33lcwy")
147+
const file = await pinata.gateways.public.get("bafkreiac3t35fklpiwqonav2vj4x2dh6x2zugkdu7dsh6zkaq5jr33lcwy")
148148
console.log(file.data)
149149
} catch (error) {
150150
console.log(error);

0 commit comments

Comments
 (0)