travopti/backend/routes/climate.js
2020-06-15 23:57:14 +02:00

12 lines
321 B
JavaScript

const router = require("express").Router()
const handleClimateUpdate = require("../models/handleClimateUpdate.js")
module.exports = dbConn => {
router.put("/api/v1/climate/update", async (req, res) => {
const update = await handleClimateUpdate(dbConn)
res.json(update)
});
return router;
};