aboutsummaryrefslogtreecommitdiffstats
path: root/lib/db.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-17 02:35:57 +0000
committerAdam Soltys <[email protected]>2023-02-17 02:36:21 +0000
commit66d005cfd01b0e27f9c954da0a4d8e326c288e04 (patch)
tree8d6f8e6002c19d7c12e778e2c919a544592bdf38 /lib/db.js
parent3ad6f0557b8cbf3abdf542f582e99135e3ac8362 (diff)
downloadcoinos-server-66d005cfd01b0e27f9c954da0a4d8e326c288e04.tar.gz
coinos-server-66d005cfd01b0e27f9c954da0a4d8e326c288e04.zip
check transaction type
Diffstat (limited to 'lib/db.js')
-rw-r--r--lib/db.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/db.js b/lib/db.js
index edf48910..cc9c3919 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,6 +1,7 @@
import config from "$config";
import { sleep } from "$lib/utils";
import { createClient } from "redis";
+import { warn } from "$lib/logging";
export const db = createClient({ url: config.db });
await db.connect();
@@ -14,7 +15,13 @@ export let g = async k => {
return v;
}
};
-export let s = (k, v) => db.set(k, JSON.stringify(v));
+export let s = (k, v) => {
+ if (k === "user:null") {
+ warn("###### NULL USER #######")
+ console.trace();
+ }
+ db.set(k, JSON.stringify(v));
+}
let retries = {};
export let t = async (k, f) => {