Skip to content

Commit

Permalink
Update tar command to use api.Provider().Provide()
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
  • Loading branch information
michaelavila committed Mar 5, 2019
1 parent 8708e51 commit 72de32d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions core/commands/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ represent it.
return err
}

api, err := cmdenv.GetApi(env, req)
if err != nil {
return err
}

enc, err := cmdenv.GetCidEncoder(req)
if err != nil {
return err
Expand All @@ -60,19 +65,11 @@ represent it.
}

c := node.Cid()
api.Provider().Provide(c)

//<<<<<<< HEAD
return cmds.EmitOnce(res, &AddEvent{
Name: it.Name(),
Hash: enc.Encode(c),
//=======
// nd.Provider.Provide(c)
//
// fi.FileName()
// return cmds.EmitOnce(res, &coreiface.AddEvent{
// Name: fi.FileName(),
// Hash: c.String(),
//>>>>>>> Add provider to ipfs and provide when adding/fetching
})
},
Type: AddEvent{},
Expand Down

0 comments on commit 72de32d

Please sign in to comment.