Skip to content

Commit

Permalink
feat(act): history
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Sárai committed Jul 29, 2024
1 parent 7e6c7ae commit 658e26e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pkg/bee/api/act.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ func (a *ActService) AddGrantees(ctx context.Context, name string, data io.Reade
var resp ActGranteesResponse
h := http.Header{}
h.Add("swarm-postage-batch-id", o.BatchID)
if o.ActHistoryAddress != nil {
h.Add("swarm-act-history-address", o.ActHistoryAddress.String())
}
h.Add("swarm-act-history-address", o.ActHistoryAddress.String())
err := a.client.requestWithHeader(ctx, http.MethodPost, "/"+apiVersion+"/grantee", h, data, &resp)
return resp, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/bee/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ type UploadOptions struct {
Tag uint64
BatchID string
Direct bool
ActHistoryAddress *swarm.Address
ActHistoryAddress swarm.Address
}

type DownloadOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/check/act/act.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, opts int
}`)))

fileHis := file.HistroryAddress()
err = upClient.AddActGrantees(ctx, &gFile, api.UploadOptions{BatchID: batchID, ActHistoryAddress: &fileHis})
err = upClient.AddActGrantees(ctx, &gFile, api.UploadOptions{BatchID: batchID, ActHistoryAddress: fileHis})
if err != nil {
return fmt.Errorf("node %s: add grantees error: %w", upNodeName, err)
}
Expand Down

0 comments on commit 658e26e

Please sign in to comment.