Enhance server monitoring and messaging functionality. Added new dependencies for date handling and system information. Updated session server model to track GPU and CPU metrics. Improved session management with better process argument handling and local IP retrieval. Refactored sendMessage route to use login for authentication.

This commit is contained in:
2026-02-17 15:35:40 +05:00
parent c8ce49acd6
commit d977290646
6 changed files with 250 additions and 109 deletions
+4 -2
View File
@@ -13,7 +13,7 @@ router.post("/", async (req, res) => {
port: req.body.port,
secure: true, // true for 465, false for other ports
auth: {
user: req.body.from, // generated ethereal user
user: req.body.login, // generated ethereal user
pass: req.body.password, // generated ethereal password
},
});
@@ -21,7 +21,7 @@ router.post("/", async (req, res) => {
const files = fs.readdirSync(req.body.path);
// send mail with defined transport object
await transporter.sendMail({
const result = await transporter.sendMail({
from: req.body.from, // sender address
to: req.body.to, // list of receivers
subject: req.body.subject, // Subject line
@@ -29,6 +29,8 @@ router.post("/", async (req, res) => {
attachments: files.map((file) => ({ path: `${req.body.path}/${file}` })), // attachment files
});
console.log(result);
return res.json({ ok: 1 });
} catch (error) {
console.log(error);