mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 07:21:09 -04:00
Code optimizations
This commit is contained in:
parent
2dd392e609
commit
7d70c4d8cd
2 changed files with 7 additions and 10 deletions
|
@ -556,14 +556,12 @@ let indexHTML = fs.readFileSync("./dist/index.html").toString();
|
|||
try {
|
||||
checkLogin(socket)
|
||||
|
||||
console.log(`Importing Backup, User ID: ${socket.userID}, Version: ${uploadedJSON[0]}`)
|
||||
let backupData = JSON.parse(uploadedJSON);
|
||||
|
||||
let notificationList = uploadedJSON[1];
|
||||
let monitorList = uploadedJSON[2];
|
||||
console.log(`Importing Backup, User ID: ${socket.userID}, Version: ${backupData.version}`)
|
||||
|
||||
monitorList = JSON.stringify(monitorList);
|
||||
monitorList = JSON.parse(monitorList);
|
||||
monitorList = Object.values(monitorList);
|
||||
let notificationList = backupData.notificationList;
|
||||
let monitorList = backupData.monitorList;
|
||||
|
||||
if (notificationList.length >= 1) {
|
||||
for (let i = 0; i < notificationList.length; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue