diff options
| author | Adam Soltys <[email protected]> | 2025-05-12 13:29:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-05-12 13:29:03 -0700 |
| commit | 1f9d2f559e6fc5dc45cd0c3d111ae66ea28112ed (patch) | |
| tree | 5ce3e61c5f0f67235ddafedd5643dce999a163c9 /routes/users.ts | |
| parent | e85ac7fa9d737fecd19cf91fbab1460dfbbf8182 (diff) | |
| download | coinos-server-1f9d2f559e6fc5dc45cd0c3d111ae66ea28112ed.tar.gz coinos-server-1f9d2f559e6fc5dc45cd0c3d111ae66ea28112ed.zip | |
whitelisting
Diffstat (limited to 'routes/users.ts')
| -rw-r--r-- | routes/users.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/routes/users.ts b/routes/users.ts index 6b73513b..189d6f05 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -33,6 +33,15 @@ export default { try { user.balance = await g(`balance:${user.id}`); user.locked = await ga(`balance:${user.id}`); + + if (user.locked) { + const whitelisted = await db.sIsMember( + "whitelist", + user?.username?.toLowerCase().trim(), + ); + if (whitelisted) user.locked = 0; + } + user.prompt = !!user.prompt; if (user.pubkey) user.npub = nip19.npubEncode(user.pubkey); |
