aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/receive.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-04-28 22:09:22 -0700
committerAdam Soltys <[email protected]>2020-04-28 22:33:02 -0700
commit63c18105e6c66b3b4698c398f356bef1b496816f (patch)
treee7ee85e7c3502ed81954448a76be028143990948 /routes/lightning/receive.js
parent994dd93f6c45c590ae59a699cbf425d96518da1e (diff)
downloadcoinos-server-63c18105e6c66b3b4698c398f356bef1b496816f.tar.gz
coinos-server-63c18105e6c66b3b4698c398f356bef1b496816f.zip
include account in emitted payments objects
Diffstat (limited to 'routes/lightning/receive.js')
-rw-r--r--routes/lightning/receive.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js
index 0805c878..97fe07dc 100644
--- a/routes/lightning/receive.js
+++ b/routes/lightning/receive.js
@@ -21,7 +21,7 @@ const handlePayment = async msg => {
}
});
- const payment = await db.Payment.create({
+ let payment = await db.Payment.create({
account_id: account.id,
user_id,
hash,
@@ -44,6 +44,8 @@ const handlePayment = async msg => {
let user = await getUserById(user_id)
+ payment = payment.get({ plain: true });
+ payment.account = account.get({ plain: true });
emit(user.username, "payment", payment);
emit(user.username, "user", user);