Updates
This commit is contained in:
@@ -27,7 +27,6 @@ export default async function sendEmailCode(
|
||||
extraCookies,
|
||||
useLocal,
|
||||
apiVersion,
|
||||
dbUserId,
|
||||
html,
|
||||
} = params;
|
||||
|
||||
@@ -52,7 +51,6 @@ export default async function sendEmailCode(
|
||||
sender,
|
||||
response,
|
||||
extraCookies,
|
||||
dbUserId,
|
||||
};
|
||||
|
||||
if (useLocal) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
APISendEmailCodeFunctionParams,
|
||||
CookieObject,
|
||||
} from "../../../types";
|
||||
import grabDbFullName from "../../../utils/grab-db-full-name";
|
||||
|
||||
/**
|
||||
* # Send Email Login Code
|
||||
@@ -25,7 +24,6 @@ export default async function apiSendEmailCode({
|
||||
html,
|
||||
response,
|
||||
extraCookies,
|
||||
dbUserId,
|
||||
}: APISendEmailCodeFunctionParams): Promise<APIResponseObject> {
|
||||
if (email?.match(/ /)) {
|
||||
return {
|
||||
@@ -34,8 +32,6 @@ export default async function apiSendEmailCode({
|
||||
};
|
||||
}
|
||||
|
||||
const dbFullName = grabDbFullName({ dbName: database, userId: dbUserId });
|
||||
|
||||
const createdAt = Date.now();
|
||||
|
||||
const foundUserQuery = `SELECT * FROM users WHERE email = ?`;
|
||||
@@ -44,7 +40,7 @@ export default async function apiSendEmailCode({
|
||||
let foundUser = (await dbHandler({
|
||||
query: foundUserQuery,
|
||||
values: foundUserValues,
|
||||
database: dbFullName,
|
||||
database,
|
||||
})) as any[];
|
||||
|
||||
if (!foundUser || !foundUser[0]) {
|
||||
@@ -101,7 +97,7 @@ export default async function apiSendEmailCode({
|
||||
await dbHandler({
|
||||
query: setTempCodeQuery,
|
||||
values: setTempCodeValues,
|
||||
database: dbFullName,
|
||||
database,
|
||||
});
|
||||
|
||||
const resObject: APIResponseObject = {
|
||||
|
||||
@@ -2406,7 +2406,6 @@ export type APISendEmailCodeFunctionParams = {
|
||||
html: string;
|
||||
response?: ServerResponse & { [s: string]: any };
|
||||
extraCookies?: CookieObject[];
|
||||
dbUserId?: string | number;
|
||||
};
|
||||
|
||||
export type SendEmailCodeParams = {
|
||||
@@ -2423,7 +2422,6 @@ export type SendEmailCodeParams = {
|
||||
extraCookies?: CookieObject[];
|
||||
useLocal?: boolean;
|
||||
apiVersion?: string;
|
||||
dbUserId?: string | number;
|
||||
/**
|
||||
* HTML string with {{code}} placeholder for the code
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user