aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-04-02 10:45:19 -0700
committerAdam Soltys <[email protected]>2020-04-02 10:45:19 -0700
commit8d15c4e724a65347a999f31486f72bdbd9d38812 (patch)
tree9c4beebd39092271e6a6d65c6f5aebb636fb15e4
parentc4605df28a3f2a103ad56ff93fc2c7eebebb169c (diff)
downloadcoinos-server-8d15c4e724a65347a999f31486f72bdbd9d38812.tar.gz
coinos-server-8d15c4e724a65347a999f31486f72bdbd9d38812.zip
set unit conditionally
-rw-r--r--routes/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 4644cc06..725a14e7 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -170,7 +170,7 @@ app.post("/user", auth, async (req, res) => {
});
}
- user.unit = unit;
+ if (unit) user.unit = unit;
user.currency = currency;
user.currencies = currencies;