aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-31 07:44:23 -0800
committerAdam Soltys <[email protected]>2024-12-31 07:46:03 -0800
commitae180c75de06829075460548de026a4b0a141a7f (patch)
tree5d17fa938c6613a46d701581a126ced93f7183d1 /lib
parent9dfd7a003436593de3418b659b915ef0d5078c0b (diff)
downloadcoinos-server-ae180c75de06829075460548de026a4b0a141a7f.tar.gz
coinos-server-ae180c75de06829075460548de026a4b0a141a7f.zip
fix variable scope issue
Diffstat (limited to 'lib')
-rw-r--r--lib/register.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/register.ts b/lib/register.ts
index 91c140b0..a35781fe 100644
--- a/lib/register.ts
+++ b/lib/register.ts
@@ -56,7 +56,7 @@ export default async (user, ip) => {
if (!pubkey) {
const sk = randomBytes(32);
- const pubkey = getPublicKey(sk);
+ pubkey = getPublicKey(sk);
user.pubkey = pubkey;
user.nsec = nip49encrypt(sk, password);
}