Skip to content

Commit

Permalink
fix: loop doesn't go through
Browse files Browse the repository at this point in the history
  • Loading branch information
mo9a7i committed Sep 24, 2023
1 parent f632e95 commit 20c21e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import cronstrue from 'cronstrue'; // convert cron expressions to human readible
import { SwarmappApi } from 'swarmapp-api'; // initialize swarmapp api
import chalk from 'chalk';


import { scheduleTask } from './utils/taskScheduler';
import { checkTokenValidity } from './utils/tokenValidation'; // to check if user auth token is valid
import { downloadCollection, updateUserDataInFirestore, updateTokenInFirestore } from './firebase/firestoreOperations'; // firestore functions
Expand All @@ -29,14 +28,13 @@ async function run() {
}
else {
console.log(chalk.red(`03: [${user_id}(${users_collection[user_id]?.name})] Auth token not found`));
return;
continue;
}

// initialize the foursquare instance
console.log(`04: Using token for ${chalk.blue(`${users_collection[user_id].name}(${user_id})`)} to initialize a foursquare instance`);
fsq_instances[user_id] = new SwarmappApi(users_collection[user_id].token);


// if token works, keep it in the memory, else delete it
try {
await fsq_instances[user_id].initialize();
Expand Down
1 change: 1 addition & 0 deletions src/test/mfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('hi')

0 comments on commit 20c21e9

Please sign in to comment.