Extract struct for return value of getTransactionsForAccount

This commit is contained in:
jacob1123 committed 2022-02-09 22:40:35 +00:00
1 parent 6cafaec422
commit 922041856f
1 file changed
+4 -2
+4 -2
View File
@@ -28,8 +28,10 @@ func (h *Handler) transactionsForAccount(c *gin.Context) {
return
}
c.JSON(http.StatusOK, struct {
c.JSON(http.StatusOK, TransactionsResponse{account, transactions})
}
type TransactionsResponse struct {
Account postgres.Account
Transactions []postgres.GetTransactionsForAccountRow
}{account, transactions})
}