Skip to content

Commit

Permalink
refactor(plugin): update plugin to new api
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Aug 26, 2019
1 parent e64a8bd commit 64f1cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsync/dsync_ipfs_plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (p *DsyncPlugin) Start(capi coreiface.CoreAPI) error {

// we MUST override the PreCheck function. In this example we're making sure
// no one sends us a bad hash:
cfg.PreCheck = p.pushPreCheck
cfg.PushPreCheck = p.pushPreCheck

// in order for remotes to allow pinning, dsync must be provided a PinAPI:
cfg.PinAPI = capi.Pin()
Expand Down Expand Up @@ -320,7 +320,7 @@ func newPullHandler(dsyncHost *dsync.Dsync) http.HandlerFunc {
}
fmt.Printf("performing pull:\n\tcid: %s\n\tremote: %s\n\tpin: %t\n", p.Cid, p.Addr, p.Pin)

pull, err := dsyncHost.NewPull(p.Cid, p.Addr)
pull, err := dsyncHost.NewPull(p.Cid, p.Addr, nil)
if err != nil {
fmt.Printf("error creating pull: %s\n", err.Error())
w.Write([]byte(err.Error()))
Expand Down

0 comments on commit 64f1cb1

Please sign in to comment.