aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
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: {