Extract struct for return value of getTransactionsForAccount
This commit is contained in:
parent
6cafaec422
commit
922041856f
@ -28,8 +28,10 @@ func (h *Handler) transactionsForAccount(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
c.JSON(http.StatusOK, struct {
|
c.JSON(http.StatusOK, TransactionsResponse{account, transactions})
|
||||||
Account postgres.Account
|
}
|
||||||
Transactions []postgres.GetTransactionsForAccountRow
|
|
||||||
}{account, transactions})
|
type TransactionsResponse struct {
|
||||||
|
Account postgres.Account
|
||||||
|
Transactions []postgres.GetTransactionsForAccountRow
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user