diff options
Diffstat (limited to 'lib/register.ts')
| -rw-r--r-- | lib/register.ts | 7 |
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(); |
