Smart relationship between model and stripe cards
Last updated
Last updated
Please be sure of your agent type and version and pick the right documentation accordingly.
This is the documentation of the forest-express-sequelize
and forest-express-mongoose
Node.js agents that will soon reach end-of-support.
forest-express-sequelize
v9 and forest-express-mongoose
v9 are replaced by v1.
Please check your agent type and version and read on or switch to the right documentation.
Context: as a user I want to display stripe cards associated to a user using the Stripe API.
First step is to declare the smart collection user_stripe_cards in a user-stripe-cards.js
file in the forest folder.
Next step is to add the smart relationship between users and stripe cards in the forest/users.js
file.
Final step is to implement the route for the relationship for the cards to be displayed as related data of a user. This is done in the routes/users.js
file.