WIP token

This commit is contained in:
newtbot
2024-01-16 04:43:39 +08:00
parent 290d0653d9
commit 7e4b2d8026
19 changed files with 534 additions and 77 deletions

View File

@ -20,7 +20,7 @@ router.get("/", async (req, res, next) => {
next(error);
}
});
/*
//add location
router.post("/new", async (req, res, next) => {
@ -58,7 +58,7 @@ router.delete("/delete", async (req, res, next) => {
}
});
*/
//get location by id
router.get("/:id", async (req, res, next) => {

View File

@ -18,7 +18,7 @@ router.get("/", async (req, res, next) => {
next(error);
}
});
/*
router.post("/new", async (req, res, next) => {
try {
@ -52,7 +52,6 @@ router.delete("/delete", async (req, res, next) => {
next(error);
}
});
*/
router.get("/:id", async (req, res, next) => {
try {
const sensor = await getSensorById(req.params.id);

View File

@ -21,7 +21,7 @@ router.get("/", async (req, res, next) => {
next(error);
}
});
/*
router.post("/new", async (req, res, next) => {
try {
const { id, id_sensor, id_location, sensordata } = req.body;
@ -54,7 +54,6 @@ router.delete("/delete", async (req, res, next) => {
next(error);
}
});
*/
router.get("/data", async (req, res, next) => {
try {
console.log(req.query);