Commit Graph

3 Commits

Author SHA1 Message Date
4d09c8641c test: enhance admin API tests with database session mocking
All checks were successful
CI / lint-and-test (push) Successful in 1m6s
- Introduced a mock database session for admin API tests to prevent real database access during CI.
- Updated test cases for the `/api/admin/me` endpoint to ensure consistent behavior without a real database.
- Improved error handling and clarity in tests by utilizing dependency overrides for session management.
- Ensured proper cleanup of dependency overrides after tests to maintain test isolation.
2026-03-06 18:08:45 +03:00
172d145f0e refactor: streamline code formatting in API and tests
Some checks failed
CI / lint-and-test (push) Failing after 1m17s
- Consolidated function call formatting in `admin_reassign_duty` for improved readability.
- Enhanced test cases by standardizing header formatting in API requests, ensuring consistency across tests.
- Improved overall code clarity and maintainability by adhering to established coding style guidelines.
2026-03-06 18:01:08 +03:00
c390a4dd6e feat: implement admin panel functionality in Mini App
- Added new API endpoints for admin features: `GET /api/admin/me`, `GET /api/admin/users`, and `PATCH /api/admin/duties/:id` to manage user duties.
- Introduced `UserForAdmin` and `AdminDutyReassignBody` schemas for handling admin-related data.
- Updated documentation to include Mini App design guidelines and admin panel functionalities.
- Enhanced tests for admin API to ensure proper access control and functionality.
- Improved error handling and localization for admin actions.
2026-03-06 09:57:26 +03:00