Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

update the codec names for the dag put command: ipld-in-ipfs series of PRs #248

Merged
merged 3 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions options/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type DagPutOption func(opts *DagPutSettings) error
// DagPutOptions applies the given options to a DagPutSettings instance.
func DagPutOptions(opts ...DagPutOption) (*DagPutSettings, error) {
options := &DagPutSettings{
InputEnc: "json",
Kind: "cbor",
InputEnc: "dag-json",
Kind: "dag-cbor",
Pin: "false",
Hash: "sha2-256",
}
Expand Down
2 changes: 1 addition & 1 deletion shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func TestDagPut(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)

c, err := s.DagPut(`{"x": "abc","y":"def"}`, "json", "cbor")
c, err := s.DagPut(`{"x": "abc","y":"def"}`, "dag-json", "dag-cbor")
is.Nil(err)
is.Equal(c, "bafyreidrm3r2k6vlxqp2fk47sboeycf7apddib47w7cyagrajtpaxxl2pi")
}
Expand Down