From 248b7ca5eecdbe4b84520e42f1a4eea21d49f38a Mon Sep 17 00:00:00 2001 From: MohammadHoseinPaymard Date: Tue, 27 May 2025 10:36:19 +0330 Subject: [PATCH] update index.js and util.js --- index.js | 17 ++++++++++------- util.js | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 3a124fd..d0d2525 100644 --- a/index.js +++ b/index.js @@ -137,18 +137,21 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); for await (let pathString of pathsCollection) { const pathCollection = pathString.split(","); - let data = {}, pathTraveled=[]; + let data = {}, pathTraveled = []; //inja masir start mishe for await (let path of pathCollection) { - const process = await bpmsDB.bpms_process.findByPk(path,{raw:true}); - const processData = await initFunctionData({ - processId: process.id, + const process = await bpmsDB.bpms_process.findByPk(path, { raw: true }); - }) - data = {...data, ...processData}; - return; + console.log(path,process); + // const processData = await initFunctionData({ + // processId: process.id, + + // }) + // data = { ...data, ...processData }; } + return; + } return; } diff --git a/util.js b/util.js index 925fc5d..162e688 100644 --- a/util.js +++ b/util.js @@ -520,7 +520,7 @@ async function createUser(data){ hash:hash("Password@123"), status: 0, consecutiveLoginFailures:0, - birthDate:`${getRandomNumber(1350, 1400)}/${getRandomNumber(1, 12)}/${getRandomNumber(1, 31)}`, + birthDate:`${getRandomNumber(1900, 1950)}-${getRandomNumber(1, 12)}-${getRandomNumber(1, 31)}`, ...data }); return newUser;