code refactor, aggregate month total count in list/by_month api
This commit is contained in:
@@ -155,7 +155,7 @@ type TransactionInfoResponse struct {
|
||||
|
||||
// TransactionCountResponse represents transaction count response
|
||||
type TransactionCountResponse struct {
|
||||
Count int64 `json:"count"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
// TransactionInfoPageWrapperResponse represents a response of transaction which contains items and next id
|
||||
@@ -164,6 +164,12 @@ type TransactionInfoPageWrapperResponse struct {
|
||||
NextTimeSequenceId *int64 `json:"nextTimeSequenceId,string"`
|
||||
}
|
||||
|
||||
// TransactionInfoPageWrapperResponse2 represents a response of transaction which contains items and count
|
||||
type TransactionInfoPageWrapperResponse2 struct {
|
||||
Items TransactionInfoResponseSlice `json:"items"`
|
||||
TotalCount int64 `json:"total_count"`
|
||||
}
|
||||
|
||||
// IsEditable returns whether this transaction can be edited
|
||||
func (t *Transaction) IsEditable(currentUser *User, utcOffset int16, account *Account, relatedAccount *Account) bool {
|
||||
if currentUser == nil || !currentUser.CanEditTransactionByTransactionTime(t.TransactionTime, utcOffset) {
|
||||
|
||||
Reference in New Issue
Block a user