aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-06 17:31:22 -0800
committerAdam Soltys <[email protected]>2023-01-06 17:31:22 -0800
commite3266ddecd825b8716df7dc418246441d4dcb0f7 (patch)
tree650dac95a42a09627f33fb3f3e76e6e0a0e23b9f /lib/utils.js
parent6f7ad86583ee4e9e359829b55cb041d014902e07 (diff)
downloadcoinos-server-e3266ddecd825b8716df7dc418246441d4dcb0f7.tar.gz
coinos-server-e3266ddecd825b8716df7dc418246441d4dcb0f7.zip
background nostr fetching
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 748b2a74..95ee5fb1 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -11,6 +11,8 @@ import ln from "$lib/ln";
const { Op } = sequelize;
+export const nada = () => {};
+
export const sleep = n => new Promise(r => setTimeout(r, n));
export const wait = async (f, s = 300, n = 50) => {
let i = 0;
@@ -33,7 +35,10 @@ export const getUser = async (username, transaction) => {
}
],
where: {
- username: { [Op.or]: [username, username.replace(/ /g, "")] }
+ [Op.or]: {
+ username: { [Op.or]: [username, username.replace(/ /g, "")] },
+ uuid: { [Op.or]: [username, username.replace(/ /g, "")] }
+ }
}
};