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 gift card system to allow users to purchase, redeem, and manage gift cards. This will involve the following:
Tasks:
Schema Design:
GiftCard
schema with fields likecardNumber
,value
,status
(active, redeemed, expired),userId
(associated user),expiryDate
, andcreatedAt
.Controller:
GiftCardController
: Logic to create new gift cards, activate them, redeem them, and check the status of a gift card.Middleware:
value
on the gift card is greater than 0 before allowing redemption.Routes:
/api/gift-cards
: To create a new gift card./api/gift-cards/:cardNumber
: To fetch details of a specific gift card./api/gift-cards/redeem
: To redeem a gift card by entering its card number.Expected Outcome:
The text was updated successfully, but these errors were encountered: