nkowaokwu / igbo-api-admin

Data entry platform for the Igbo API.
https://editor.igboapi.com
Apache License 2.0
8 stars 20 forks source link

Expose an endpoint for the purpose of tracking referred users #456

Closed IfyNdu closed 10 months ago

IfyNdu commented 1 year ago

Is your feature request related to a problem? Please describe. In order to streamline the implementation of a referral code system, it is essential to establish a dedicated API endpoint tailored to monitor and allocate points to users who successfully refer other users.

Describe the solution you'd like Expose an endpoint with the signature below

[POST] /referral?referral-code=<myawesomecode>

It should create a new referral with Mongodb's User Collection as described here #450.

  1. Query the User collection described here #450 for the owner of the referral code
  2. Use the response in the query above to create a Referral document also described here #450

Additional context

  1. Software design document for inspiration.
IfyNdu commented 11 months ago

@ijemmao Please assign this ticket to me. Thanks!

ijemmao commented 11 months ago

done! @IfyNdu