Update types

This commit is contained in:
Benjamin Toby 2024-10-19 17:59:05 +01:00
parent 0690b5f081
commit fabf2945d7
3 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@ const varDatabaseDbHandler = require("../engine/utils/varDatabaseDbHandler");
/**
*
* @param {PackageUserLoginLocalBody} param0
* @param {import("../../package-shared/types").PackageUserLoginLocalBody} param0
* @returns
*/
async function loginLocalUser({

View File

@ -77,15 +77,6 @@ async function localSendEmailCode({
msg: "No user found",
};
function generateCode() {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
let code = "";
for (let i = 0; i < 8; i++) {
code += chars[Math.floor(Math.random() * chars.length)];
}
return code;
}
if (foundUser && foundUser[0] && email_login_field) {
const tempCode = generateCode();
@ -150,4 +141,13 @@ async function localSendEmailCode({
}
}
function generateCode() {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
let code = "";
for (let i = 0; i < 8; i++) {
code += chars[Math.floor(Math.random() * chars.length)];
}
return code;
}
module.exports = localSendEmailCode;

View File

@ -1,6 +1,6 @@
{
"name": "datasquirel",
"version": "2.2.3",
"version": "2.2.6",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {