Closed falhar closed 1 month ago
The changes in this pull request involve the addition of a new configuration variable for Stripe, the introduction of several migration scripts for database schema modifications, and the integration of a new model for managing DevConsole users. Additionally, modifications were made to various service and controller files to support the new user management functionalities. The package.json
file was updated to include a Stripe dependency, and several existing files were modified to incorporate the new features and improve functionality.
File Path | Change Summary |
---|---|
.example.env |
Added new configuration variable STRIPE_PRIVATE_KEY . |
migrations/scripts/20240109164955-alter-table-user-add-column-account-balance.js |
Deleted migration script for adding accountBalance column to "User" table. |
migrations/scripts/20241008061631-create-dev-console-user.js |
Added migration script to create DevConsoleUser table with fields: id , dcUserId , balance , createdAt , updatedAt , deletedAt . |
migrations/scripts/20241008072554-rename-column-appId-to-dcProjectId.js |
Added migration script to rename ownerId to dcProjectId in "App" table. |
migrations/scripts/20241008150753-add-new-column-ownerId.js |
Added migration script to add ownerId column to "App" table. |
package.json |
Added new dependency "stripe": "^17.1.0" to dependencies . |
src/components/common.js |
Added STRIPE_PRIVATE_KEY to configuration object; required dotenv for environment variable loading. |
src/components/index.js |
Imported stripe module and initialized it in the init function. |
src/components/stripe.js |
Introduced StripeProvider class with methods init and getTransactionById . |
src/controllers/console.js |
Added new handler methods: handleCreateDCUser , handleUpdateBalanceDCUser , handleGetDCUser . |
src/models/app.js |
Renamed field ownerId to dcProjectId and added new field ownerId . |
src/models/dev-console-user.js |
Introduced new model for DevConsoleUser with fields: id , dcUserId , balance . |
src/models/index.js |
Registered DevConsoleUser model with Sequelize instance. |
src/server.js |
Removed automatic invocation of checkUpdateBalance in Server constructor. |
src/server/cron.js |
Deleted file containing scheduled job for updating user account balances. |
src/services/app.js |
Updated create method to include dcProjectId parameter; simplified validateWebLoginToken method. |
src/services/user.js |
Updated logSmsTrx method to include balance management for DevConsoleUser . |
In the fields where bunnies play,
New features hop in bright array.
With Stripe now in our cozy den,
DevConsole users cheer again!
Balances update, all is right,
Hopping forward, hearts so light! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Release Notes
New Features
DevConsoleUser
.Bug Fixes
Chores
These changes enhance user experience by improving payment processing and user management functionalities.