Closed stevem-zhou closed 8 months ago
Do I need access to the Firebase project to complete this issue? I would like to see the database tables
Do I need access to the Firebase project to complete this issue? I would like to see the database tables
You don't need the Firebase project to complete this. To see the database table, you can use pgAdmin with the .env info, or Postman and use a get request on the leaderboard to see the data that it gives back or also the DB document in our ZotnFound drive! Let me know if you need anything else =D
Where and when do you send emails? Is it when a new item is placed? So is it called in the create new items route? And also what causes the emails to be sent out to everyone? Do you query all the users and call sendEmail
on each? I think filtering the list off one query retrieving all users who are subscribed be the best approach because if we did at the user level we would have to call a query for each user.
Yes you're correct! We send email in backend when a new item is created. We query all user email in leaderboard table to send to everyone in it.
in backend, under POST /items
NOTE:nearbyItems
is the email in leaderboard, we should rename it!
Ooh ic ic, thank you! I completely missed it cause of the nearbyItems
name lol.
How to find the bug:
Why is this:
How to fix:
There is a new column called “subscription” in the leaderboard table with default value of true
With this in mind, add a new option to select under the profile which is in
Home.jsx
:Also add some text in the email html template which is in the backend repo (
emailTemplate
-->index.html
) that has a link that will lead the user to set their description to falseResources: