diff --git a/package-lock.json b/package-lock.json index cc6731a8..21c011ad 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 78305e42..76fdcb8a 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/fosscord/fosscord-api#readme", "dependencies": { - "@fosscord/server-util": "^1.2.8", + "@fosscord/server-util": "^1.3.0", "@types/jest": "^26.0.22", "@types/json-schema": "^7.0.7", "ajv": "^8.4.0", 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 = email.match(EMAIL_REGEX); // @ts-ignore