Skip to content

Commit

Permalink
Fix CORS error and extract members
Browse files Browse the repository at this point in the history
  • Loading branch information
bulgariamitko committed Jan 16, 2024
1 parent 7d53b3f commit 2f9cbc9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
15 changes: 7 additions & 8 deletions Cloud Functions/cors-error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ const admin = require('firebase-admin');
// To avoid deployment errors, do not call admin.initializeApp() in your code
const cors = require('cors')({ origin: true });

exports.fixCorsError = functions.https.onCall(
(data, context) => {
const userToDel = data.userToDel;
const authUser = data.authUser;
// Write your code below!
exports.fixCorsError = functions.https.onRequest((data, res) => {
cors(data, res, async () => {
const userId = data.body.data.userToDel;
const authUserId = data.body.data.authUser;

// Write your code above!
}
);
// add your code here
});
});
11 changes: 8 additions & 3 deletions Paid Members/extract-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ async function processCSV(filePath) {
crlfDelay: Infinity,
});

let isFirstLine = true;

for await (const line of rl) {
if (isFirstLine) {
isFirstLine = false;
continue;
}
processLine(line);
}

Expand All @@ -37,9 +43,7 @@ function processLine(line) {
tiers.set(tier, []);
}

if (name !== 'Член') {
tiers.get(tier).push(name);
}
tiers.get(tier).push(name);
}

function displayTiers() {
Expand All @@ -52,5 +56,6 @@ function displayTiers() {
});
}


const filePath = 'members.csv'; // Replace with the actual file path
processCSV(filePath);
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ If you are interested in contributing to this repository, please feel free to su
Join the list - https://www.youtube.com/@flutterflowexpert/join

Klaturov Fanatic
| Carrilho Rubens
| Henrique Santos
| traian lorent
| Akshay Dewan
| razvanrh
Expand Down Expand Up @@ -43,10 +45,10 @@ Klaturov Fanatic
| Daniel Andrade
| Yash SRIVASTAVA
| Vernon Penny
| Carrilho Rubens
| Yulian Diaz Leon

Klaturov Cadet
| Rafael Borchardt
| Miguel A. Martín - Informática IES Almenara
| YouGuitar
| arun ung
Expand Down

0 comments on commit 2f9cbc9

Please sign in to comment.