diff options
| author | Adam Soltys <[email protected]> | 2024-08-26 16:28:30 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-26 16:28:30 -0700 |
| commit | 00e43ddc0bf3d6dd719fc9295d156567fa2fecfb (patch) | |
| tree | 9719782a64056ff904c0053223d70547bb7f398c /lib/utils.js | |
| parent | 3c611a4e6fbb31fa7d8e32ed256037c45aca1d6d (diff) | |
| download | coinos-server-00e43ddc0bf3d6dd719fc9295d156567fa2fecfb.tar.gz coinos-server-00e43ddc0bf3d6dd719fc9295d156567fa2fecfb.zip | |
switch to bun
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js index f53b76d2..ada32521 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -70,7 +70,7 @@ export let fields = [ export let getUser = async (username) => { if (username === "undefined") fail("invalid user"); let user = await migrate(username); - if (!user.nwc) { + if (user && !user.nwc) { user.nwc = bytesToHex(randomBytes(32)); s(`user:${user.id}`, user); } |
