Commit graph

15 commits

Author SHA1 Message Date
MrEisbear
e09463b59c feat: Add Discord routes and configuration for bot key validation 2025-09-24 19:19:32 -05:00
MrEisbear
2987adad3e fix two routes being named equally 2025-09-20 21:04:30 -05:00
MrEisbear
dcee6058cb feat: Add transaction routes and update configurations
This commit introduces new transaction routes for handling various transaction-related operations. It also includes updates to the `config.py` file to support these new features.

The following files were modified:
- `README.md`: Updated documentation to clarify .env variables and their purposes
- `To-Do.md`: Updated task meaningless
- `config.py`: Added COLLECT_COOLDOWN and TAX_ACCOUNT_BID configurations.

    Main Thing:
- `interbend/routes/transaction_routes.py`:
Added boilerplate transaction to handle all transfers and separated business transfers with tax application.
/transfer for personal transfers
/transfer-business for business transfers with tax deduction

TODO: add route to change tax rate and add non hardcoded tax rate.
Type 6 and 7 are reserved for future use. currently implemented are 0 and 1.
2025-09-20 20:59:19 -05:00
MrEisbear
3c5550beed fix(admin): Correct variable name in add_money validation 2025-09-20 20:28:26 -05:00
MrEisbear
94ed01c88a Fix To-Do. Deleted non backend tasks and added important note about collect system.
Added COLLECT_COOLDOWN default to 24 hours if not set in env.
Fixed .gitignore to ignore vscode settings and python cache files.
Added new transaction history to To-Do and marked as finished - Needs to be tested´

why tf am I commiting this on main branch?
2025-09-20 19:49:44 -05:00
MrEisbear
ec88bad538 Merge branch 'fix-payroll-and-add-todo' of github.com:MrEisbear/Interbend 2025-09-20 19:26:07 -05:00
MrEisbear
ec3237ff22 fixed config 2025-09-20 19:19:58 -05:00
google-labs-jules[bot]
a2d76db373 fix(payroll): Refactor /collect endpoint and add To-Do.md
This commit addresses several issues in the `/collect` endpoint to improve its security and robustness. It also introduces a `To-Do.md` file as requested by the user.

Key changes:
- Refactored the `/collect` endpoint to use a single database transaction, preventing data inconsistencies.
- Fixed SQL injection vulnerabilities by converting all database queries to use parameterized statements.
- Corrected a `TypeError` by ensuring the `COLLECT_COOLDOWN` configuration variable is always an integer.
- Updated transaction logging to record 'SYSTEM' as the source of funds for salary collections, instead of a "NULL" string.
- Added a `To-Do.md` file with suggestions for future features, including an automated payroll system, user transaction history, and an admin panel.
2025-09-21 00:19:13 +00:00
MrEisbear
b0e68f51d9 Add note to transaction record 2025-07-27 18:58:26 -05:00
MrEisbear
cfdedc1110 Implement BID generation
This commit implements automatic BID generation during registration
2025-07-25 23:27:20 -05:00
MrEisbear
7c9656e4d9 Adds a transaction record when salary is paid. 2025-07-24 22:43:36 -05:00
MrEisbear
ed256b8e6e HOTFIX, duped method 2025-07-24 22:25:56 -05:00
MrEisbear
bc4beb825a Adds endpoints for setting user jobs and adding money. 2025-07-24 19:35:10 -05:00
MrEisbear
bcc089e13b Adds the /collect route for users to claim job salaries.
Introduces COLLECT_COOLDOWN config for salary collection.
2025-06-20 19:06:06 -05:00
MrEisbear
6919abf4f7 Refactor: routes: Modularize routes into blueprints 2025-06-14 23:33:37 -05:00