summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-23 12:44:02 -0500
committerDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-23 12:44:02 -0500
commit55cf3b4b02bdc673048820e39172d406fd72b134 (patch)
tree6777da6f2ee4bd28ae3fb4dc055be02537fd4ae2 /src
parentScripts: Generator should use necessary instead of required (diff)
downloadserver-55cf3b4b02bdc673048820e39172d406fd72b134.tar.xz
Update: Update fosscord-server-util to latest and fix issues with NULL and undefined
Diffstat (limited to 'src')
-rw-r--r--src/routes/auth/register.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/auth/register.ts b/src/routes/auth/register.ts

index b52b5cf3..eeef961e 100644 --- a/src/routes/auth/register.ts +++ b/src/routes/auth/register.ts
@@ -40,7 +40,7 @@ router.post( // TODO: check password strength // adjusted_email will be slightly modified version of the user supplied email -> e.g. protection against GMail Trick - let adjusted_email: string | undefined = adjustEmail(email); + let adjusted_email: string | null = adjustEmail(email); // adjusted_password will be the hash of the password let adjusted_password: string = ""; @@ -181,7 +181,7 @@ router.post( mobile: false, premium: false, premium_type: 0, - phone: undefined, + phone: null, mfa_enabled: false, verified: false, presence: { @@ -253,7 +253,7 @@ router.post( } ); -export function adjustEmail(email: string): string | undefined { +export function adjustEmail(email: string): string | null { // body parser already checked if it is a valid email const parts = <RegExpMatchArray>email.match(EMAIL_REGEX); // @ts-ignore