Skip to content

Commit

Permalink
fix(ref-imp): #960 - fixed incorrect IPFS pin API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
thehenrytsai committed Dec 4, 2020
1 parent 26bc857 commit ece6d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ipfs/Ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ export default class Ipfs implements ICas {
}

private async pinContent (hash: string) {
// e.g. 'http://127.0.0.1:5001/api/v0/pin?arg=QmPPsg8BeJdqK2TnRHx5L2BFyjmFr9FK6giyznNjdL93NL'
const pinUrl = new URL(`/api/v0/pin?arg=${hash}`, this.uri).toString();
// e.g. 'http://127.0.0.1:5001/api/v0/pin/add?arg=QmPPsg8BeJdqK2TnRHx5L2BFyjmFr9FK6giyznNjdL93NL'
const pinUrl = new URL(`/api/v0/pin/add?arg=${hash}`, this.uri).toString();
await this.fetch(pinUrl, { method: 'POST' });
}
}

0 comments on commit ece6d7f

Please sign in to comment.