update sendDeviceInfo follow model special and RAM, flash

This commit is contained in:
joseph le 2023-10-12 10:28:35 +07:00
parent 2a33901778
commit 00cb88b5f4
1 changed files with 12 additions and 11 deletions

View File

@ -290,8 +290,6 @@ export const sendDeviceInfora = async () => {
});
await Promise.all(filePromises);
if (listInformation.length > 0) {
console.log(listInformation);
let specialModel = allKeyValue
.filter((i) => i.key === "MODEL_SPECIAL")
.map((obj) => obj.$attributes.value);
@ -301,6 +299,9 @@ export const sendDeviceInfora = async () => {
i.flash !== "" ||
specialModel.filter((m) => i.PID.includes(m)).length > 0
);
if (listInformation.length > 0) {
console.log(listInformation);
listInformation.map((inf) => {
html += `<tr><td>${inf.PID}</td>
<td>${inf.VID}</td>
@ -311,8 +312,8 @@ export const sendDeviceInfora = async () => {
});
const options = {
from: "admin@apactech.io",
to: "joseph@apactech.io, ips@ipsupply.com.au",
// to: "joseph@apactech.io",
// to: "joseph@apactech.io, ips@ipsupply.com.au",
to: "joseph@apactech.io",
subject: "(AUTO-REPORT) SERIAL NUMBER",
html:
"<table border='1'>\