diff --git a/pkg/api/transactions.go b/pkg/api/transactions.go index 53da06a4..2cd2692e 100644 --- a/pkg/api/transactions.go +++ b/pkg/api/transactions.go @@ -53,7 +53,7 @@ func (a *TransactionsApi) TransactionCountHandler(c *core.Context) (interface{}, totalCount, err := a.transactions.GetTransactionCount(uid, transactionCountReq.MaxTime, transactionCountReq.MinTime, transactionCountReq.Type, allCategoryIds, transactionCountReq.AccountId, transactionCountReq.Keyword) countResp := &models.TransactionCountResponse{ - Count: totalCount, + TotalCount: totalCount, } return countResp, nil diff --git a/pkg/models/transaction.go b/pkg/models/transaction.go index 64dd80e0..ef443ae8 100644 --- a/pkg/models/transaction.go +++ b/pkg/models/transaction.go @@ -155,7 +155,7 @@ type TransactionInfoResponse struct { // TransactionCountResponse represents transaction count response type TransactionCountResponse struct { - Count int64 `json:"count"` + TotalCount int64 `json:"total_count"` } // TransactionInfoPageWrapperResponse represents a response of transaction which contains items and next id