You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to keep track of who supports (users that have donated or volunteered at) a non-profit. We could get this information using the existing events and donations field of each non-profit, but it will be cumbersome to get unique user IDs from all events and donations of a non-profit. Before doing this task, if you can figure out an easy way to get unique user IDs from these two fields, lmk and we won't have to do this.
Add a supporters field - array of user IDs - to the non-profits schema. Write a migration script as well.
Modify the logDonation server action to check if the passed-in user ID is already a supporter for the non-profit. If it's not, add the user ID as a supporter.
eventsanddonationsfield of each non-profit, but it will be cumbersome to get unique user IDs from alleventsanddonationsof a non-profit. Before doing this task, if you can figure out an easy way to get unique user IDs from these two fields, lmk and we won't have to do this.logDonationserver action to check if the passed-in user ID is already a supporter for the non-profit. If it's not, add the user ID as a supporter.