Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sage31 committed Jul 30, 2023
1 parent cd7c79a commit 525e337
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mainModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ onAuthStateChanged(auth, (user) => {
window.location.href = "index.html";
}
else {
localStorage.setItem("community", community);
localStorage.setItem("community", data.community);
// Add in the crushes.
for (let crush of data.crushes) {
document.getElementById("crushesHTML").innerHTML +=
Expand Down
5 changes: 2 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ app.post("/addCrush", async (req, res) => {
if (crush != null) {
if (crush.uid == uid) {
matches++;
break;
}
}
}
Expand All @@ -319,8 +318,8 @@ app.post("/addCrush", async (req, res) => {
}
if (!admirerAlreadyExists) {
// Update the other person's admirers.
adList.push({ uid: uid, year: myYear });
database.ref(`users/${community}/${person}`).update({ admirers: adList })
admirerList.push({ uid: uid, year: myYear });
database.ref(`users/${community}/${person}`).update({ admirers: admirerList })
}

// Add to current person's crushes.
Expand Down

0 comments on commit 525e337

Please sign in to comment.