From 86f00de29820eab96bc41efcf28ed0683a38d58a Mon Sep 17 00:00:00 2001 From: bogap <58374268+bogap@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:30:27 +0300 Subject: [PATCH] Ecliptica routes --- server/routers/epja-2024-1/ecliptica/index.js | 1 - server/routers/epja-2024-1/ecliptica/plants/config.js | 1 + server/routers/epja-2024-1/ecliptica/plants/getPlants.js | 1 + server/routers/epja-2024-1/ecliptica/plants_calendar/index.js | 1 - 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/epja-2024-1/ecliptica/index.js b/server/routers/epja-2024-1/ecliptica/index.js index 9db8617..f937ffa 100644 --- a/server/routers/epja-2024-1/ecliptica/index.js +++ b/server/routers/epja-2024-1/ecliptica/index.js @@ -2,5 +2,4 @@ const router = require('express').Router(); const plantsRouter = require('express').Router(); module.exports = router; - router.use('/plants',plantsRouter) \ No newline at end of file diff --git a/server/routers/epja-2024-1/ecliptica/plants/config.js b/server/routers/epja-2024-1/ecliptica/plants/config.js index 8b9b0c3..4cc00ac 100644 --- a/server/routers/epja-2024-1/ecliptica/plants/config.js +++ b/server/routers/epja-2024-1/ecliptica/plants/config.js @@ -3,4 +3,5 @@ const CONFIG = { CLIENT_SECRET: 'bJq7Uiwua52tHiLP80N60hALNtQX2wcE4Mj6yNA9OzG2iZbgHuqyeAs6WSWX6MNJdfv0Nqzb7OHta8qPZr4zxWBLTauleaMfraln3xFEvbXLDpi1Lcrwe7DxfgsQQ1E4', }; + module.exports = CONFIG; \ No newline at end of file diff --git a/server/routers/epja-2024-1/ecliptica/plants/getPlants.js b/server/routers/epja-2024-1/ecliptica/plants/getPlants.js index aeb89e4..506f29d 100644 --- a/server/routers/epja-2024-1/ecliptica/plants/getPlants.js +++ b/server/routers/epja-2024-1/ecliptica/plants/getPlants.js @@ -13,6 +13,7 @@ app.listen(port, () => { console.log(`Server is running on port ${port}`); }); + async function getAccessToken() { const formData = new FormData(); formData.append('grant_type', 'client_credentials'); diff --git a/server/routers/epja-2024-1/ecliptica/plants_calendar/index.js b/server/routers/epja-2024-1/ecliptica/plants_calendar/index.js index ec5b4c8..f0b73db 100644 --- a/server/routers/epja-2024-1/ecliptica/plants_calendar/index.js +++ b/server/routers/epja-2024-1/ecliptica/plants_calendar/index.js @@ -21,7 +21,6 @@ const plants = [ }, ]; - const calculateWateringDates = (startDate, frequency) => { const dates = []; const start = new Date(startDate);