Updated WoL

This commit is contained in:
Sean Edmunds
2025-01-28 10:10:18 -06:00
parent 319eea4b55
commit eae8450795

View File

@@ -420,8 +420,19 @@ app.delete("/trigger/api/categories", async (req, res) => {
conn.end(); conn.end();
}); });
app.get("/trigger/api/wakeDakota", (req, res) => { app.get("/trigger/api/wolClients", async (req, res) => {
wol.wake("18:C0:4D:81:57:68", (err, res) => {}); const conn = await pool.getConnection();
const query = "SELECT * from trigger_database.wolClients;";
conn.query(query).then((rows) => {
res.status(200).send(rows);
});
conn.end();
});
app.post("/trigger/api/wolClients", async (req, res) => {
wol.wake(req.body.selectedClient.macAddress, () => {
res.status(200).send(rows);
});
}); });
// app is listening on port 5000 // app is listening on port 5000