Skip to content

Refactor dependency handling and enhance user management features - #29

Merged
prinako merged 6 commits into
mainfrom
dev
Jul 11, 2026
Merged

prinako merged 6 commits into
mainfrom
dev

Conversation

@prinako

@prinako prinako commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a new API endpoint and supporting backend logic to fetch multiple users by their Telegram IDs, and refactors the AgendaPayment class in the Telegram bot to use a more modular, handler-based approach for processing keyboard interactions. It also updates some dependencies and makes minor improvements to Dockerfile and package management.

Backend: Multi-User Fetching by Telegram IDs

  • Added a new API endpoint /api/users-ids/:telegramIds and supporting controller, service, and repository functions to retrieve multiple users by their Telegram IDs. This includes getByTelegramIds in the controller, getUsers in the service, and getUsersByTelegramIds in the repository. [1] [2] [3] [4]
  • Updated exports and imports across backend files to support the new multi-user functionality. [1] [2] [3] [4] [5]
  • Added a placeholder getUsers function in the bot's backend client for future use.

Bot: Refactoring AgendaPayment Keyboard Handling

  • Refactored the AgendaPayment class to use a handler pattern for keyboard interactions, improving code readability and maintainability. Each keyboard action (e.g., member toggle, month selection, bank selection) now has its own method. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Improved error handling and separation of concerns for bank selection and picker display. [1] [2]

Dependency and Build Improvements

  • Updated dependencies in tele_bot/package.json to newer versions for dotenv, node-cron, and node-telegram-bot-api.
  • Improved Docker build context in tele_bot/Dockerfile for more precise copying of files and directories.

Other

  • Removed the root-level package.json, possibly as part of a project structure cleanup.

prinako added 6 commits July 10, 2026 20:11
This commit deletes the package.json and package-lock.json files from the project, indicating a potential shift in project management or dependency handling. This change may affect how dependencies are managed and installed moving forward.
…api versions

This commit updates the versions of dotenv, node-cron, and node-telegram-bot-api in package.json to their latest releases. These updates may include bug fixes, performance improvements, and new features that enhance the functionality and stability of the application.
…ic in agenda payment

This commit refactors the handleKeyboard method in the AgendaPayment class to utilize a more structured approach for handling callback queries. It introduces a handler array to streamline the processing of different callback data types, improving code readability and maintainability. Additionally, the member selection logic is enhanced to ensure better validation and user feedback during the agenda payment process, while maintaining the overall functionality of the bot.
This commit introduces a new API endpoint that allows fetching multiple users based on their Telegram IDs. The `getByTelegramIds` function is implemented in the users controller, and corresponding repository and service methods are added to handle the database queries. Additionally, the routes are updated to include the new endpoint, enhancing the user management capabilities of the application.
…ity and organization

This commit modifies the Dockerfile to explicitly copy the package.json file and the src directory, enhancing the clarity of the build process. The changes ensure that only necessary files are included in the Docker image, streamlining the application setup.
This commit modifies the Dockerfile to copy both package.json and package-lock.json in a single step, improving the build process efficiency. Additionally, the package-lock.json is updated to reflect the latest version of dotenv, enhancing dependency management and ensuring compatibility with recent changes.
@prinako
prinako merged commit 3861011 into main Jul 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant