Update function sendDeviceInfor to mail

This commit is contained in:
joseph le 2023-10-10 13:43:12 +07:00
parent 3c91f9b5cf
commit b2aaa60f6e
2 changed files with 5 additions and 9 deletions

View File

@ -328,8 +328,8 @@ export const sendDeviceInfora = async () => {
console.log(listInformation);
const options = {
from: "admin@apactech.io",
to: "joseph@apactech.io",
subject: "SN AUTO REPORT",
to: "joseph@apactech.io, ips@ipsupply.com.au",
subject: "(AUTO-REPORT) SERIAL NUMBER",
html:
"<table border='1'>\
<thead>\

View File

@ -219,14 +219,10 @@ Route.get("/api/log/showLog/:name?", "LogsController.showLog").middleware(
"writeLog"
);
Route.get("/api/getAllLogDetect", "LogsController.getAllLogDetect").middleware(
"writeLog"
);
Route.get("/api/getAllLogDetect", "LogsController.getAllLogDetect")
//Key-Value
Route.post("/api/getKeyValue", "ValuesController.getKeyValue").middleware(
"writeLog"
);
Route.post("/api/getKeyValue", "ValuesController.getKeyValue")
Route.post("/api/deleteValue", "ValuesController.destroy").middleware(
"writeLog"
@ -281,7 +277,7 @@ Route.post("/api/backupProduct", async ({ request, response }) => {
}
}).middleware("writeLog");
Route.post("/api/test", async ({ request, response }) => {
Route.post("/api/sendMailInforDevice", async ({ request, response }) => {
try {
sendDeviceInfora()
} catch (error) {