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
Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊
You can also check our CONTRIBUTING.md for guidelines on contributing to this project.
Description:
We need to implement a loyalty point and referral system in the application. This will involve the following:
Tasks:
Schema Design:
LoyaltyPoint
schema with fields likeuserId
,points
,earnedBy
(purchase, referral, etc.), andtimestamp
.Referral
schema with fields likereferrerId
,refereeId
,referralCode
,status
(pending, completed), andtimestamp
.Controllers:
LoyaltyPointsController
: Logic to award points, check balance, and view transaction history.ReferralController
: Logic to generate referral codes, check referral status, and process new referrals.Middleware:
Routes:
/api/loyalty-points
: To award points./api/loyalty-points
: To fetch a user's loyalty points./api/referrals
: To generate a referral code./api/referrals/:code
: To check if a referral code is valid and has been used.The text was updated successfully, but these errors were encountered: