Skip to content

Commit

Permalink
updates comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HeetShah committed Nov 20, 2023
1 parent 75e7f5c commit ecf6f6c
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions backend/typescript/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,12 @@ app.get("/diff", async (req, res) => {
const currentTerm = memeberData.term;
const currentTermMembers: string[] = [];

// const teamToMembers : Record<string, string[]> = {};
memeberData.members.forEach((member) => {
if (member.term === currentTerm) {
currentTermMembers.push(member.name);
// if (teamToMembers[member.teams[0]]) {
// teamToMembers[member.teams[0]].push(member.name);
// } else {
// teamToMembers[member.teams[0]] = [member.name];
// }
}
});

// const teamToMemberSize : Record<string, number> = {};
// (Object.keys(teamToMembers)).forEach((team) => {
// teamToMemberSize[team] = teamToMembers[team].length;
// }
// )

const firebaseUsers: Record<string, string | undefined> = {};
firebaseAuthUsers.forEach((user) => {
firebaseUsers[user.uid] = user.displayName;
Expand Down Expand Up @@ -127,9 +115,9 @@ app.get("/authUsers", async (req, res) => {
app.get("/termApplications", async (req, res) => {
ref
.orderByChild("term")
.equalTo("Fall 2023")

.once("value", function fn(snapshot) {
.equalTo("Fall 2023") // Fetch all applications for <term> (e.g. Fall 2023)
// eslint-disable-next-line func-names
.once("value", function (snapshot) {
const applications: Application[] = [];
snapshot.forEach((childSnapshot) => {
applications.push(childSnapshot.val());
Expand Down

0 comments on commit ecf6f6c

Please sign in to comment.