aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 23c811c1..8e857659 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -6,10 +6,12 @@ getUser = async (username, transaction) => {
include: [
{
model: db.Account,
- as: "account"
- }
+ as: "account",
+ },
],
- where: { username }
+ where: {
+ username: { [Op.or]: [username, username.replace(/ /g, "")] },
+ },
};
if (transaction) {
@@ -28,10 +30,10 @@ getUserById = async (id, transaction) => {
include: [
{
model: db.Account,
- as: "account"
- }
+ as: "account",
+ },
],
- where: { id }
+ where: { id },
};
if (transaction) {