aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-04-27 21:42:10 -0700
committerAdam Soltys <[email protected]>2020-04-28 22:33:02 -0700
commit994dd93f6c45c590ae59a699cbf425d96518da1e (patch)
tree89b2a980fbad1e964e91ca3750b89051ddfb32f0 /lib/utils.js
parente166ab2c743e4c66eacb51c6484711c5965dd090 (diff)
downloadcoinos-server-994dd93f6c45c590ae59a699cbf425d96518da1e.tar.gz
coinos-server-994dd93f6c45c590ae59a699cbf425d96518da1e.zip
fix lightning payments
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 58bf29f9..98409efc 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -22,7 +22,7 @@ getUser = async username => {
order: [["id", "DESC"]],
where: {
user_id: user.id,
- account_id: user.account.id,
+ account_id: user.account_id,
[Op.or]: {
received: true,
amount: {
@@ -37,7 +37,7 @@ getUser = async username => {
};
getUserById = async id => {
- let user = db.User.findOne({
+ let user = await db.User.findOne({
include: [
{
model: db.Account,
@@ -57,7 +57,7 @@ getUserById = async id => {
order: [["id", "DESC"]],
where: {
user_id: user.id,
- account_id: user.account.id,
+ account_id: user.account_id,
[Op.or]: {
received: true,
amount: {