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.
1.4 KiB
1.4 KiB
Project To-Do and Feature Ideas
This file tracks potential new features and improvements for the Interbend banking system.
Feature Suggestions
-
Automated Payroll System:
- Description: Instead of requiring users to manually call the
/collectendpoint, a scheduled script could run periodically (e.g., every 24 hours) to automatically distribute salaries to all eligible users. - Benefits: Improves user experience, ensures consistent pay, and reduces repeated API calls to the server.
- Description: Instead of requiring users to manually call the
-
User Transaction History:
- Description: Create a new API endpoint (e.g.,
GET /transactions) that allows an authenticated user to retrieve a paginated list of their own transaction history. - Benefits: Provides users with transparency and a way to track their finances, which is a core feature of any banking application.
- Description: Create a new API endpoint (e.g.,
-
Comprehensive Admin Panel:
- Description: Develop a simple web-based dashboard for administrators. This would be more user-friendly than using API endpoints for administrative tasks.
- Features:
- View and manage all users (e.g., edit balance, change job, view profile).
- Manage jobs and their corresponding salaries.
- View system-wide transaction logs and financial statistics.
- A secure login system for administrators.
- Benefits: Greatly simplifies the management of the roleplay economy and provides better oversight.