aboutsummaryrefslogtreecommitdiffstats
path: root/lib/register.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
committerAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
commitad7b09b43323d0ffc0a8ddabb43e4838a184c697 (patch)
treefbf2a59f81771b2938f474c8e7b35a497d2960e4 /lib/register.ts
parent9e97e040617bfa0b40150c0eba298bf186bbeeaf (diff)
downloadcoinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.tar.gz
coinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.zip
formatting
Diffstat (limited to 'lib/register.ts')
-rw-r--r--lib/register.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/register.ts b/lib/register.ts
index e99238b1..ac1997db 100644
--- a/lib/register.ts
+++ b/lib/register.ts
@@ -19,8 +19,7 @@ export default async (user, ip) => {
const reserved = ["ecash"];
if (!username) fail("Username required");
username = username.toLowerCase().replace(/\s/g, "");
- if (!valid.test(username))
- fail("Usernames can only have letters and numbers");
+ if (!valid.test(username)) fail("Usernames can only have letters and numbers");
if (reserved.includes(username)) fail("Invalid username");
if (username.includes("undefined")) fail("Invalid username");
@@ -41,7 +40,9 @@ export default async (user, ip) => {
if (config.ipregistry) {
try {
const {
- location: { country: { code } },
+ location: {
+ country: { code },
+ },
}: any = await got(
`https://api.ipregistry.co/${ip}?key=${config.ipregistry}&fields=location.country.code`,
).json();