diff options
| author | Adam Soltys <[email protected]> | 2020-06-27 14:53:49 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-06-27 14:53:49 -0700 |
| commit | 7c1f6e8c79f9f8ef8923328012aa3910fdd455a6 (patch) | |
| tree | 4a08a1ca80f9b6217fb241627c8dc832d922ad66 | |
| parent | a95989e04be8c6620d182ece46956f48e3ccbd9c (diff) | |
| download | coinos-server-7c1f6e8c79f9f8ef8923328012aa3910fdd455a6.tar.gz coinos-server-7c1f6e8c79f9f8ef8923328012aa3910fdd455a6.zip | |
watch old invoice addresses
| -rw-r--r-- | routes/payments.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js index 9fa2ce54..f82262df 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -15,6 +15,14 @@ const { join } = require("path"); if (u.liquid) addresses[u.liquid] = u.username; }); + await db.Invoice.findAll({ + include: [{ + model: db.User, + as: 'user'}] + }).map(i => { + if (i.address && i.user) addresses[i.address] = i.user.username; + }); + payments = ( await db.Payment.findAll({ attributes: ["hash"] |
