aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-03 01:28:48 -0700
committerAdam Soltys <[email protected]>2022-11-03 01:28:48 -0700
commit4f5a5014cc097dc8a30f691bd49bf5055708a5e9 (patch)
tree7d2bf5a509da2cc5465b53a4147e7754ffd65de1 /routes
parentbba0fc2708130962cd4d9373acc3ab68c9334c7e (diff)
parentda2a1713b13b31310843136eeaabe524c4eee42c (diff)
downloadcoinos-server-4f5a5014cc097dc8a30f691bd49bf5055708a5e9.tar.gz
coinos-server-4f5a5014cc097dc8a30f691bd49bf5055708a5e9.zip
Merge branch 'master' into prod
Diffstat (limited to 'routes')
-rw-r--r--routes/payments.js5
-rw-r--r--routes/users.js2
2 files changed, 6 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js
index d60d4e2e..dc298c1a 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -125,6 +125,11 @@ app.get("/payments", auth, async (req, res) => {
model: db.Account,
as: "account"
},
+ include: {
+ attrs: ["username", "profile"],
+ model: db.User,
+ as: "with"
+ },
limit,
offset
});
diff --git a/routes/users.js b/routes/users.js
index da8dfca0..b142eb3a 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -57,7 +57,7 @@ app.get("/users/:username", async (req, res) => {
const { username } = req.params;
const user = await db.User.findOne({
- attributes: ["username", "banner", "profile", "address"],
+ attributes: ["username", "banner", "profile", "address", "currency"],
where: Sequelize.where(
Sequelize.fn("lower", Sequelize.col("username")),
username.toLowerCase()