diff --git a/http/account.go b/http/account.go index 93867a7..03296c2 100644 --- a/http/account.go +++ b/http/account.go @@ -28,8 +28,10 @@ func (h *Handler) transactionsForAccount(c *gin.Context) { return } - c.JSON(http.StatusOK, struct { - Account postgres.Account - Transactions []postgres.GetTransactionsForAccountRow - }{account, transactions}) + c.JSON(http.StatusOK, TransactionsResponse{account, transactions}) +} + +type TransactionsResponse struct { + Account postgres.Account + Transactions []postgres.GetTransactionsForAccountRow }