Skip to content

Commit 072b34e

Browse files
bus: change PUT to POST route
1 parent 355e535 commit 072b34e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bus/bus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ func (b *Bus) Handler() http.Handler {
417417
"GET /contracts/prunable": b.contractsPrunableDataHandlerGET,
418418
"GET /contracts/renewed/:id": b.contractsRenewedIDHandlerGET,
419419
"GET /contracts/sets": b.contractsSetsHandlerGET,
420-
"PUT /contracts/set/:set": b.contractsSetHandlerPUT,
420+
"POST /contracts/set/:set": b.contractsSetHandlerPUT,
421421
"DELETE /contracts/set/:set": b.contractsSetHandlerDELETE,
422422
"POST /contracts/spending": b.contractsSpendingHandlerPOST,
423423
"GET /contract/:id": b.contractIDHandlerGET,

bus/client/contracts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ func (c *Client) ReleaseContract(ctx context.Context, contractID types.FileContr
207207

208208
// UpdateContractSet adds the given contracts to the given set.
209209
func (c *Client) UpdateContractSet(ctx context.Context, set string, toAdd, toRemove []types.FileContractID) (err error) {
210-
err = c.c.WithContext(ctx).PUT(fmt.Sprintf("/contracts/set/%s", set), api.ContractSetUpdateRequest{
210+
err = c.c.WithContext(ctx).POST(fmt.Sprintf("/contracts/set/%s", set), api.ContractSetUpdateRequest{
211211
ToAdd: toAdd,
212212
ToRemove: toRemove,
213-
})
213+
}, nil)
214214
return
215215
}

0 commit comments

Comments
 (0)