From 2f9cbc9f20092de16e3cc3ebe13ea0085b3e9611 Mon Sep 17 00:00:00 2001 From: Dimitar Klaturov Date: Tue, 16 Jan 2024 22:13:56 +0100 Subject: [PATCH] Fix CORS error and extract members --- Cloud Functions/cors-error/index.js | 15 +++++++-------- Paid Members/extract-members.js | 11 ++++++++--- README.md | 4 +++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Cloud Functions/cors-error/index.js b/Cloud Functions/cors-error/index.js index 6d92b43..cc695c3 100644 --- a/Cloud Functions/cors-error/index.js +++ b/Cloud Functions/cors-error/index.js @@ -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! - } -); \ No newline at end of file + // add your code here + }); +}); \ No newline at end of file diff --git a/Paid Members/extract-members.js b/Paid Members/extract-members.js index 7da2a8e..461f77c 100644 --- a/Paid Members/extract-members.js +++ b/Paid Members/extract-members.js @@ -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); } @@ -37,9 +43,7 @@ function processLine(line) { tiers.set(tier, []); } - if (name !== 'Член') { - tiers.get(tier).push(name); - } + tiers.get(tier).push(name); } function displayTiers() { @@ -52,5 +56,6 @@ function displayTiers() { }); } + const filePath = 'members.csv'; // Replace with the actual file path processCSV(filePath); diff --git a/README.md b/README.md index 46244a1..fe2ed2d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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