Ecliptica routes
This commit is contained in:
parent
bab1ae5f04
commit
86f00de298
@ -2,5 +2,4 @@ const router = require('express').Router();
|
|||||||
const plantsRouter = require('express').Router();
|
const plantsRouter = require('express').Router();
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|
||||||
|
|
||||||
router.use('/plants',plantsRouter)
|
router.use('/plants',plantsRouter)
|
@ -3,4 +3,5 @@ const CONFIG = {
|
|||||||
CLIENT_SECRET: 'bJq7Uiwua52tHiLP80N60hALNtQX2wcE4Mj6yNA9OzG2iZbgHuqyeAs6WSWX6MNJdfv0Nqzb7OHta8qPZr4zxWBLTauleaMfraln3xFEvbXLDpi1Lcrwe7DxfgsQQ1E4',
|
CLIENT_SECRET: 'bJq7Uiwua52tHiLP80N60hALNtQX2wcE4Mj6yNA9OzG2iZbgHuqyeAs6WSWX6MNJdfv0Nqzb7OHta8qPZr4zxWBLTauleaMfraln3xFEvbXLDpi1Lcrwe7DxfgsQQ1E4',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
module.exports = CONFIG;
|
module.exports = CONFIG;
|
@ -13,6 +13,7 @@ app.listen(port, () => {
|
|||||||
console.log(`Server is running on port ${port}`);
|
console.log(`Server is running on port ${port}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
async function getAccessToken() {
|
async function getAccessToken() {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('grant_type', 'client_credentials');
|
formData.append('grant_type', 'client_credentials');
|
||||||
|
@ -21,7 +21,6 @@ const plants = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
const calculateWateringDates = (startDate, frequency) => {
|
const calculateWateringDates = (startDate, frequency) => {
|
||||||
const dates = [];
|
const dates = [];
|
||||||
const start = new Date(startDate);
|
const start = new Date(startDate);
|
||||||
|
Loading…
Reference in New Issue
Block a user