Merge branch 'main' of https://github.com/Newtbot/MP
This commit is contained in:
parent
ad01b1d4a2
commit
711fe45fa1
@ -2,15 +2,20 @@ const dotenv = require("dotenv");
|
||||
const path = require('path')
|
||||
require('dotenv').config({ path: path.resolve(__dirname, '../.env') })
|
||||
const Sequelize = require("sequelize");
|
||||
const fs = require('fs');
|
||||
|
||||
const sequelize = new Sequelize(
|
||||
"eco_saver",
|
||||
process.env.DB_USER,
|
||||
process.env.DB_PASS,
|
||||
|
||||
{
|
||||
host: "mpsqldatabase.mysql.database.azure.com",
|
||||
dialect: 'mysql'
|
||||
dialect: 'mysql',
|
||||
dialectOptions: {
|
||||
ssl: {
|
||||
ca: fs.readFileSync(path.resolve(__dirname, '../cert/DigiCertGlobalRootCA.crt.pem')),
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -211,10 +211,6 @@ const logUserCreationActivity = async (creatorUsername, success, message) => {
|
||||
"INSERT INTO user_logs (username, activity, timestamp) VALUES (?, ?, CURRENT_TIMESTAMP)";
|
||||
const logParams = [creatorUsername, activity];
|
||||
|
||||
const connection = mysql.createConnection(mysqlConfig);
|
||||
|
||||
connection.connect();
|
||||
|
||||
connection.query(logSql, logParams, (error, results) => {
|
||||
if (error) {
|
||||
console.error("Error logging user creation activity:", error);
|
||||
@ -223,7 +219,6 @@ const logUserCreationActivity = async (creatorUsername, success, message) => {
|
||||
console.log("User creation activity logged successfully");
|
||||
}
|
||||
|
||||
connection.end(); // Close the connection after logging activity
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error in logUserCreationActivity function:", error);
|
||||
|
9
log.csv
9
log.csv
@ -1,9 +0,0 @@
|
||||
"id";"username";"activity";"timestamp"
|
||||
36;"tester";"successful login";"2023-12-26 12:46:39"
|
||||
37;"tester";"link sent successfully";"2023-12-26 12:58:35"
|
||||
38;"testerer";"link not sent";"2023-12-26 12:59:04"
|
||||
39;"tester";"link sent successfully";"2023-12-26 13:03:27"
|
||||
40;"testerer";"link not sent";"2023-12-26 13:03:30"
|
||||
41;"tester";"link sent successfully";"2023-12-26 13:05:30"
|
||||
42;"tester";"link sent successfully";"2023-12-27 08:03:21"
|
||||
43;"tester";"successful login";"2023-12-27 08:04:01"
|
|
9
user.csv
9
user.csv
@ -1,9 +0,0 @@
|
||||
"id";"name";"username";"email";"password";"lastLogin";"jobTitle";"reset_token";"reset_token_expiry";"otp";"otp_expiry"
|
||||
22;"tester";"tester";"whtsean234@gmail.com";"$2b$10$.D/HS/TMOq6fh0NedWUH6OIdhsCPy//WIvdi8LPWsgijZLjSuiN9e";"2023-12-27 08:04:00";"admin";"";"";"";""
|
||||
23;"BIG2EYEZ";"BIG2EYEZ";"123";"$2b$10$ZePWpETN8Gzxe5T0HGmR1OyyqxCnN5OdNzFpuXXBVLUFczT/RCDD6";"";"admin";"";"";"";""
|
||||
81;"BIG2EYEZ";"tester45";"whtsean234@gmail.com45";"$2b$10$meJELmKgTfWcGCHnsp5usulJ0bFk70EI/1xhDBjnctMTYaf/x3h4O";"";"admin";"";"";"";""
|
||||
82;"BIG2EYEZ";"tester67";"whtsean234@gmail.com67";"$2b$10$/JKAs21D1ZV9G.6Qp.tVWOsnPQU.RPAfQyHtKd8FoKN7JNi0AmgLq";"";"admin";"";"";"";""
|
||||
83;"BIG2EYEZ";"BIG2EYEZ1";"whtsean234@gmail.com69";"$2b$10$NzjSfPUeZKaxXlZhxtLC9OmdNiJBnf5JxqpzEiRCUA3z4uHygYtO2";"";"admin";"";"";"";""
|
||||
84;"BIG2EYEZ";"RT";"whtsean234@gmail.comRT";"$2b$10$q1vi8968.PStCMfd2ISVc.xfEX07jUVGUsq2JVahtjQ6umO/p7wnG";"";"admin";"";"";"";""
|
||||
85;"BIG2EYEZ";"testerko";"whtsean234@gmail.comko";"$2b$10$a66w7IZgQfNp60n5UeLeB.r0V41LKtXxAe3P0xX1Oc2WDXoncz8vu";"";"admin";"";"";"";""
|
||||
86;"BIG2EYEZ";"testerjk";"whtsean234@gmail.comjk";"$2b$10$s1dPUZq/JH1EcACVw9opgOiDmdjNRRU8SH/iHuYbI/Eo9mFfo0mQC";"";"admin";"";"";"";""
|
|
Loading…
x
Reference in New Issue
Block a user