aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-09-25 16:25:28 -0700
committerAdam Soltys <[email protected]>2020-09-25 16:25:28 -0700
commit4849c6ac324df67d2f5fc20ed4a958fe9a2bfa1f (patch)
tree47dbc6b2cd45cf7c3e0040a481a67dd0a90f96d3
parentc97ede8b3a29e5f742ac73542c83e6d170326760 (diff)
downloadcoinos-server-4849c6ac324df67d2f5fc20ed4a958fe9a2bfa1f.tar.gz
coinos-server-4849c6ac324df67d2f5fc20ed4a958fe9a2bfa1f.zip
group account balances by pubkey
-rw-r--r--routes/info.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/info.js b/routes/info.js
index 5f9e06df..f8a0fa72 100644
--- a/routes/info.js
+++ b/routes/info.js
@@ -17,9 +17,10 @@ app.get("/balances", ah(async (req, res, next) => {
const accounts = await db.Account.findAll({
attributes: [
"asset",
+ "pubkey",
[sequelize.fn("sum", sequelize.col("balance")), "total"]
],
- group: ["asset"],
+ group: ["asset", "pubkey"],
});
let lnchannel;