Skip to content

Commit 76e7fe0

Browse files
authored
fix: space/blob/list ok type (#79)
The ok type for `space/blob/list` contains a `cause` field with the CID of the task that caused the blob to be stored.
1 parent 7186954 commit 76e7fe0

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

capabilities/space/blob/blob.ipldsch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type ListOk struct {
2929

3030
type ListBlobItem struct {
3131
blob Blob
32+
cause Link
3233
insertedAt ISO8601Date
3334
}
3435

capabilities/space/blob/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type ListOk struct {
4343

4444
type ListBlobItem struct {
4545
Blob types.Blob
46+
Cause ipld.Link
4647
InsertedAt time.Time
4748
}
4849

capabilities/space/blob/list_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ func TestRoundTripListOk(t *testing.T) {
3535
Digest: testutil.RandomMultihash(t),
3636
Size: uint64(1024),
3737
},
38+
Cause: testutil.RandomCID(t),
3839
InsertedAt: time.Now().UTC().Truncate(time.Second),
3940
},
4041
{
4142
Blob: types.Blob{
4243
Digest: testutil.RandomMultihash(t),
4344
Size: uint64(2048),
4445
},
46+
Cause: testutil.RandomCID(t),
4547
InsertedAt: time.Now().UTC().Truncate(time.Second),
4648
},
4749
}

0 commit comments

Comments
 (0)