Closed falhar closed 1 month ago
This pull request introduces enhancements across multiple files, focusing on the addition of new environment variables and configuration parameters related to balance management. The .example.env
file is updated with three new AWS SNS-related variables. The common.js
file is modified to include these variables in the configuration object. Additionally, the ConsoleController
class gains a new method for updating application owner IDs, while the WebLoginController
class sees improvements in code formatting and minor logic simplifications. Lastly, the UserService
class enhances the logSmsTrx
method to better manage user balances and alert for low balances.
File | Change Summary |
---|---|
.example.env |
Added new environment variables: FIXED_PRICE_AWS_SNS , LOW_BALANCE_ALERT_THRESHOLD , LOW_BALANCE_ALERT_API . |
README.md |
Added new keys to the configuration table: STRIPE_PRIVATE_KEY , FIXED_PRICE_AWS_SNS , LOW_BALANCE_ALERT_THRESHOLD , LOW_BALANCE_ALERT_API , with descriptions. |
src/components/common.js |
Added new properties to config : FIXED_PRICE_AWS_SNS , LOW_BALANCE_ALERT_THRESHOLD , LOW_BALANCE_ALERT_API , initialized from environment variables. |
src/controllers/console.js |
Added method handleUpdateOwnerId for updating application owner IDs; registered new route for PUT requests to /apps ; simplified balance parsing in existing methods. |
src/controllers/web-login.js |
Reformatted code for improved readability; minor logic simplifications in route handlers, particularly in balance checking. |
src/services/user.js |
Updated logSmsTrx method to manage user balance using newBalance and added low balance alert logic. |
STRIPE_PRIVATE_KEY
in the .example.env
file, which is similar to the addition of FIXED_PRICE_AWS_SNS
, LOW_BALANCE_ALERT_THRESHOLD
, and LOW_BALANCE_ALERT_API
in the main PR.src/services/user.js
file, which is also affected in the main PR. The main PR introduces new properties related to balance management, while this PR updates the logSmsTrx
method to include checks for user balances.🐰 In the meadow, changes bloom,
New alerts to chase the gloom.
Balances shift, a dance so bright,
With every hop, we take flight!
AWS whispers, "Look and see,"
A world of balance, wild and free! 🌼
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
New Features
Bug Fixes
Refactor
Documentation