comment unused position endpoint
This commit is contained in:
27
index.js
27
index.js
@@ -597,21 +597,22 @@ app.get('/verify_device', authenticateToken, async (req, res) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/position', authenticateToken, async (req, res) => {
|
// no longer polling server - using webSocket
|
||||||
console.log("devicepos");
|
// app.get('/position', authenticateToken, async (req, res) => {
|
||||||
try {
|
// console.log("devicepos");
|
||||||
const {rows} = await pool.query("select last_pos, peripheral_number, await_calib from peripherals where device_id=$1",
|
// try {
|
||||||
[req.peripheral]);
|
// const {rows} = await pool.query("select last_pos, peripheral_number, await_calib from peripherals where device_id=$1",
|
||||||
|
// [req.peripheral]);
|
||||||
|
|
||||||
if (rows.length == 0) {
|
// if (rows.length == 0) {
|
||||||
return res.sendStatus(404);
|
// return res.sendStatus(404);
|
||||||
}
|
// }
|
||||||
|
|
||||||
res.status(200).json(rows);
|
// res.status(200).json(rows);
|
||||||
} catch {
|
// } catch {
|
||||||
res.status(500).json({error: "server error"});
|
// res.status(500).json({error: "server error"});
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
app.post('/manual_position_update', authenticateToken, async (req, res) => {
|
app.post('/manual_position_update', authenticateToken, async (req, res) => {
|
||||||
console.log("setpos");
|
console.log("setpos");
|
||||||
|
|||||||
Reference in New Issue
Block a user