diff options
| author | Adam Soltys <[email protected]> | 2025-03-19 10:37:56 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-03-19 10:37:56 -0700 |
| commit | 51fe575b9977fb787a3094237b83ee27dd3d03be (patch) | |
| tree | 3fc76cc78e45d8f2ce4ec9e70184c616c2ec02e6 | |
| parent | 1629a9ea8542324b93b9918da6620966fe8af36a (diff) | |
| download | coinos-server-51fe575b9977fb787a3094237b83ee27dd3d03be.tar.gz coinos-server-51fe575b9977fb787a3094237b83ee27dd3d03be.zip | |
fix account deletion
| -rw-r--r-- | routes/users.ts | 4 |
1 files 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 }); |
