aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-07-07 01:51:04 -0400
committerAdam Soltys <[email protected]>2020-07-07 01:51:04 -0400
commita28cdca28a6ce742ae9baabe6015c7afcebbf825 (patch)
tree4bcceeb19443b8af115da1a9acc987374b60012e
parent9f29f46be2c99b2f932f4196fa615a72f653e275 (diff)
downloadcoinos-server-a28cdca28a6ce742ae9baabe6015c7afcebbf825.tar.gz
coinos-server-a28cdca28a6ce742ae9baabe6015c7afcebbf825.zip
fix findOrCreate query
-rw-r--r--routes/lnurl.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/routes/lnurl.js b/routes/lnurl.js
index 05308d41..f841b87f 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -222,8 +222,10 @@ lnurlServer.bindToHook("login", async (key) => {
if (user) {
const k = await db.Key.findOrCreate({
- user_id: user.id,
- hex: key,
+ where: {
+ user_id: user.id,
+ hex: key,
+ }
});
l.info("added key", username, k);