Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and pass referred_by value to backend if p query exists in the url. #183

Open
4 tasks
ecurrencyhodler opened this issue Feb 7, 2024 · 0 comments
Open
4 tasks

Comments

@ecurrencyhodler
Copy link
Contributor

ecurrencyhodler commented Feb 7, 2024

Context

We are creating a referral program to pay out rewards automatically to hunters that refer.

First create the referred_by property in the local browser.

Then when a referred hunter signs up anywhere on our site (https://community.sphinx.chat/bounties), if referred_by UUID exists in localStorage, then send it to the backend, find that person's ID, and store it on the newly created Person record as a new SQL column called referred_by.

If referred_by is already known, then the new uuid will be ignored.

This task is specifically for passing the uuid to the backend.

Acceptance Criteria

  • I've tested on Chrome
  • I've submitted a recording in my pr
  • I've created a test that asserts that the uuid is saved in local storage if uuid is found
  • I have rebased and tested locally before submitting my PR

Here is an example unit test

Here is an example component test

@ecurrencyhodler ecurrencyhodler added this to the Referral Bot milestone Feb 7, 2024
@ecurrencyhodler ecurrencyhodler changed the title Pass referred_by value to backend if p query exists in the url. Createa and pass referred_by value to backend if p query exists in the url. Feb 7, 2024
@ecurrencyhodler ecurrencyhodler changed the title Createa and pass referred_by value to backend if p query exists in the url. Create and pass referred_by value to backend if p query exists in the url. Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant