remove comments

This commit is contained in:
Pau 2023-01-09 13:10:15 +01:00
parent 0eed231dce
commit f79662beb6
3 changed files with 0 additions and 7 deletions

View File

@ -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];
}

View File

@ -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 });

View File

@ -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 {