From f79662beb6fac9cfda19dbc6099b9523e116ecda Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Mon, 9 Jan 2023 13:10:15 +0100 Subject: [PATCH] remove comments --- index.js | 5 ----- models/index.js | 1 - utils.js | 1 - 3 files changed, 7 deletions(-) diff --git a/index.js b/index.js index 012206a..f98b310 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,6 @@ import moment from 'moment'; import { getClientToken } from './utils.js'; -// Check the existence of the .env file import dotenv from 'dotenv'; dotenv.config(); @@ -9,12 +8,9 @@ import models from './models/index.js'; let AccessToken = await getClientToken(models); -// eslint-disable-next-line no-unused-vars -let tokenValue = AccessToken[0]; let tokenExpirationDate = AccessToken[1]; try { - // Every 30 sec query the database setInterval(async () => { console.log('Querying the API to check for new data...'); console.log('Current token expiration date: ', tokenExpirationDate); @@ -22,7 +18,6 @@ try { if (moment().isAfter(tokenExpirationDate)) { console.log('Token expired, getting a new one...'); AccessToken = await getClientToken(models); - tokenValue = AccessToken[0]; tokenExpirationDate = AccessToken[1]; } diff --git a/models/index.js b/models/index.js index d4d7175..a0259c3 100644 --- a/models/index.js +++ b/models/index.js @@ -32,7 +32,6 @@ let models = { characteristics: characteristics(sequelize), }; -// Force sync the models if the enviroment variable "FORCE_SYNC" is set to true if (process.env.FORCE_SYNC === 'true') { console.log('Syncing the models...'); await sequelize.sync({ force: true }); diff --git a/utils.js b/utils.js index e21bd31..2fbd9e5 100644 --- a/utils.js +++ b/utils.js @@ -27,7 +27,6 @@ async function getClientToken(models) { const tokenResponse = await tokenRequest.json(); - // If the token request is successful, show a message in the console if (tokenRequest.status === 200) { console.log('Token request successful'); } else {