storagenode/console/service: SatellitePayStubMonthly returns array of objects
Change-Id: I06d86087c81acd2eb3acd73c1997bab9734bae9e
This commit is contained in:
parent
884638a294
commit
1af70703ef
@ -80,7 +80,7 @@ func (heldAmount *HeldAmount) PayStubMonthly(w http.ResponseWriter, r *http.Requ
|
||||
return
|
||||
}
|
||||
|
||||
if err := json.NewEncoder(w).Encode(payStub); err != nil {
|
||||
if err := json.NewEncoder(w).Encode([]*heldamount.PayStub{payStub}); err != nil {
|
||||
heldAmount.log.Error("failed to encode json response", zap.Error(ErrHeldAmountAPI.Wrap(err)))
|
||||
return
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ func TestHeldAmountApi(t *testing.T) {
|
||||
require.NotNil(t, res)
|
||||
require.Equal(t, http.StatusOK, res.StatusCode)
|
||||
|
||||
expected, err := json.Marshal(paystub)
|
||||
expected, err := json.Marshal([]heldamount.PayStub{paystub})
|
||||
require.NoError(t, err)
|
||||
|
||||
defer func() {
|
||||
|
Loading…
Reference in New Issue
Block a user