AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Referrals data logic #328

Closed HectorAgudelo closed 1 week ago

chef-louis commented 1 week ago

@HectorAgudelo @pm-moyanor The code looks great and core functionality is there which is awesome -- nice work!

There is one area that I'm confused about. inviteRevokeAction (defined inside InviteRevokeStore.ts) is currently a Jotai atom that makes a POST request toe the referralInvite endpoint. What is the thinking behind turning this into an atom instead of creating an API route handler as we have for other POST requests?

chef-louis commented 1 week ago

Touched base with @HectorAgudelo, the InviteRevokeStore.ts was initially intended to maintain some state. Over time the implementation had changed to not require state, so we will merge as-is with the intent of cleaning this up into the existing route-handler endpoint for referralInvite or refactoring into the same userData endpoint that currently houses the user's invite data.