From 72de32de7d310afdc7018c28f002f04b45fad3a6 Mon Sep 17 00:00:00 2001 From: Michael Avila Date: Thu, 28 Feb 2019 15:25:36 -0800 Subject: [PATCH] Update tar command to use api.Provider().Provide() License: MIT Signed-off-by: Michael Avila --- core/commands/tar.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/core/commands/tar.go b/core/commands/tar.go index 94b4c3a275c..308bf820a64 100644 --- a/core/commands/tar.go +++ b/core/commands/tar.go @@ -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 @@ -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{},