From 51fe575b9977fb787a3094237b83ee27dd3d03be Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 19 Mar 2025 10:37:56 -0700 Subject: fix account deletion --- routes/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/users.ts b/routes/users.ts index 74ad79b5..e26083e3 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -776,7 +776,7 @@ export default { const { name } = req.body; const pos = await db.lPos(`${uid}:accounts`, id); - if (!pos) fail("account not found"); + if (pos == null) fail("account not found"); const account = await g(`account:${id}`); account.name = name; @@ -792,7 +792,7 @@ export default { const { type } = await g(`account:${id}`); const pos = await db.lPos(`${uid}:accounts`, id); - if (!(type && pos)) fail("account not found"); + if (!(type && pos != null)) fail("account not found"); try { const node = rpc({ ...config[type], wallet: id }); -- cgit v1.2.3