import { Router } from "express";
import signalData from "../middleware/signal.js";
import pogoda from "../middleware/pogoda.js";

const router = Router();

router.get("/api/pogoda", pogoda, function(req, res, next) {
  res.json(req.d);
});

router.get("/api/signal/:sensor", signalData, function(req, res, next) {
  res.json(req.d);
});

export default router;