Commit Graph
179 Commits
Author SHA1 Message Date
MythEclipse 4c435708c0 feat: Add endpoint to retrieve hackathon submissions and implement seeding for test submissions 2025-09-27 19:24:45 +07:00
MythEclipse ac462ea771 Refactor IAM tests: Remove unused repository tests, streamline service tests, and enhance validation checks for team and user services 2025-09-27 17:58:15 +07:00
MythEclipse 3e52223730 refactor: Update route parameters in hackathon controller for consistency 2025-09-27 13:40:02 +07:00
MythEclipse 01e479350b test: Add not found scenarios for hackathon, event, timeline, and submission repository operations 2025-09-27 13:16:13 +07:00
MythEclipse b0cf9817d7 feat: Implement submission retrieval and timeline validation in hackathon service 2025-09-27 13:06:55 +07:00
MythEclipse e530eba60d Add comprehensive tests for hackathon service functionality
- Implemented tests for creating, retrieving, updating, and deleting hackathons.
- Added validation tests for hackathon creation and updates.
- Included tests for hackathon events and timelines, ensuring proper handling of edge cases.
- Created tests for hackathon submissions, including validation and submission status updates.
- Organized tests into a dedicated module for better structure and maintainability.
2025-09-27 13:01:08 +07:00
MythEclipse ef1d63e893 refactor: Update OTP handling in auth repository tests and clean up unused variables in team and user repository tests 2025-09-26 23:30:13 +07:00
MythEclipse 5859af5294 Refactor environment module: Rename enviroment to environment and consolidate environment configuration management
- Updated all references from `enviroment` to `environment` across the codebase.
- Removed the old `enviroment` module and replaced it with a new `environment` module that includes centralized configuration management.
- Enhanced OTP generation to include secure hashing and expiration handling.
- Improved CSRF token generation and validation with better error handling.
- Cleaned up logging statements in various modules for clarity and consistency.
- Updated response formatting to include versioning from Cargo.toml.
- Removed unused mock test module from utils.
2025-09-26 23:15:33 +07:00
MythEclipse c12da948aa refactor: Clean up Argon2 password hashing implementation and remove unused configuration constants 2025-09-26 22:24:23 +07:00
MythEclipse 3cde18360c refactor: Simplify gateway service initialization and enhance seeding process for gacha rolls 2025-09-26 17:50:31 +07:00
MythEclipse 14b22328de Refactor and enhance SurrealDB integration and resource management
- Updated `lib.rs` to selectively expose specific entities and services for better clarity.
- Improved SurrealDB client initialization with detailed logging in `surrealdb/mod.rs`.
- Enhanced resource definitions in `resource.rs` with additional utility methods for better resource management.
- Refactored user data retrieval logic in `auth_middleware/mod.rs` for improved readability and efficiency.
- Cleaned up middleware exports in `lib.rs` for clearer API surface.
- Added detailed comments and documentation throughout the SurrealDB module for better maintainability.
- Updated tests to ensure compatibility with new changes and improved structure.
- Introduced new permissions module structure in `imphnen-utils` for future enhancements.
2025-09-26 17:35:30 +07:00
MythEclipse 96debc210a Refactor permissions and user DTOs to use imphnen_entities module
- Updated permissions_repository.rs to import PermissionsItemDto from imphnen_entities.
- Modified permissions_schema.rs to import PermissionsItemDto and PermissionsQueryDto from imphnen_entities.
- Changed roles_dto.rs to import PermissionsItemDto and PermissionsQueryDto from imphnen_entities.
- Updated users_dto.rs to import ExperienceDto, EducationDto, UsersDetailQueryDto, RolesDetailQueryDto, and RolesDetailItemDto from imphnen_entities, and removed redundant struct definitions.
- Refactored users_repository.rs to import UsersDetailQueryDto from imphnen_entities.
- Updated users_schema.rs to import UsersDetailQueryDto, ExperienceDto, and EducationDto from imphnen_entities.
- Modified users_service.rs to use UsersDetailQueryDto from imphnen_entities and added UserLookupService implementation.
- Updated Cargo.toml in imphnen-libs to include async-trait as a workspace dependency.
- Refactored axum module to remove redundant imports and streamline code.
- Updated lib.rs to include AppState struct with user_lookup_service and auth_repository fields.
- Refactored surrealdb module to define SurrealWsClient and SurrealMemClient types.
- Removed imphnen-iam dependency from middleware's Cargo.toml.
- Updated auth_middleware to use UsersDetailQueryDto from imphnen_entities and refactored user retrieval logic.
- Refactored permissions_middleware to use PermissionsEnum from imphnen_entities and updated user retrieval logic.
- Updated mock_test.rs to create AppState with user_lookup_service and auth_repository.
- Added permissions.rs and users.rs to imphnen_entities with necessary DTOs and enums.
- Created services.rs in imphnen-libs to define UserLookupService and AuthRepositoryTrait traits.
2025-09-26 15:05:45 +07:00
MythEclipse b80662188f feat: Update admin teams endpoint to return 403 Forbidden for unauthorized access 2025-09-26 13:04:48 +07:00
MythEclipse 7b9ce6cda1 feat: Add seeding process for teams and ensure permissions are seeded even when other seeds are skipped 2025-09-26 02:23:55 +07:00
MythEclipse 1bb2d6a419 feat: Add Administrator permission to seeding process and ensure permissions are seeded even when other seeds are skipped 2025-09-26 01:35:06 +07:00
MythEclipse 14690a378f feat: Allow access for users with Administrator permission in permissions guard 2025-09-26 01:30:00 +07:00
MythEclipse 17cc4ccdba refactor: Update permissions handling to filter out None values and ensure safe access 2025-09-26 01:08:18 +07:00
MythEclipse 1b7368a4b7 feat: Add Administrator permission and update permissions handling for roles and users 2025-09-26 00:45:57 +07:00
MythEclipse ff2e14d5f9 feat: Introduce Administrator permission and update permissions checks for access control 2025-09-25 23:47:29 +07:00
MythEclipse 012aff60ef refactor: Update admin team routes to remove versioning and avoid conflicts 2025-09-25 23:28:37 +07:00
MythEclipse f3d88e2ac9 Add comprehensive tests for Gacha Credits, Auth, and User services
- Implement tests for GachaCreditsService including creation, retrieval, updating, and deletion of gacha credits.
- Add tests for AuthController covering user login, registration, email verification, and error handling for invalid credentials.
- Enhance AuthService tests to include login, registration, email verification, OTP resend, password reset, and token refresh functionalities.
- Create tests for UsersService to validate user creation, retrieval, updating, deletion, and fetching by email.
- Ensure all tests utilize a consistent setup and teardown process for database interactions.
2025-09-25 22:53:26 +07:00
MythEclipse 0e48b6755f refactor: Remove unused execute_safe_count_query import from teams_repository 2025-09-25 22:07:38 +07:00
MythEclipse 7056f8c8a6 Add comprehensive tests for IAM permissions, roles, teams, and users
- Implemented unit tests for PermissionsController and PermissionsService, covering create, read, update, and delete operations.
- Added tests for RolesController and RolesService, including handling of duplicates and retrieval by ID.
- Developed tests for TeamsController, including creation, retrieval, updating, deletion, and search functionality.
- Created tests for UsersController, ensuring user creation and validation of attributes.
- Each test includes setup, execution, and cleanup to maintain database integrity.
2025-09-25 22:06:21 +07:00
MythEclipse 4ecdcd12d2 feat: Add administrator permissions to PermissionsEnum and update related team management functionality 2025-09-25 20:57:31 +07:00
MythEclipse dd4a73e360 feat: Add comprehensive admin team management functionality with new permissions and endpoints 2025-09-25 20:28:08 +07:00
MythEclipse 49e0a89ad1 feat: Enhance team management and permissions structure with detailed DTOs and service methods 2025-09-25 20:18:16 +07:00
MythEclipse 82b85abe8f a 2025-09-25 17:29:17 +07:00
MythEclipse df11aa5eb8 a 2025-09-25 17:26:39 +07:00
MythEclipse ac44867ec1 feat: Add member team management functionality with detailed DTOs and service methods 2025-09-22 17:38:54 +07:00
MythEclipse 7205afe43b feat: Implement admin team management endpoints with permissions and DTOs 2025-09-22 17:25:02 +07:00
MythEclipse b1c678c72b feat: Add public team listing and detail endpoints with DTOs for public access 2025-09-22 17:07:14 +07:00
MythEclipse fa3687c6be feat: Add team-related DTOs and update routes for team management 2025-09-22 16:55:03 +07:00
MythEclipse ba46a19a5a refactor: Replace surrealdb_helpers with integrated query builder methods for improved clarity and functionality 2025-09-22 16:38:07 +07:00
MythEclipse 8cdbca24ba feat: Enhance query builder with new condition methods and safe query execution 2025-09-22 16:09:22 +07:00
MythEclipse 8f981572cd feat: Introduce surrealdb_helpers for query building and execution utilities 2025-09-22 15:06:37 +07:00
MythEclipse 39b75f410f Add unit tests for TeamsRepository and TeamsService
- Implement tests for team creation, retrieval, updating, and deletion in TeamsRepository.
- Add tests for team member management including adding and removing members.
- Create tests for team invitations and searching teams.
- Ensure proper cleanup of test data after each test case.
- Validate unauthorized operations for team management.
2025-09-22 14:59:38 +07:00
MythEclipse 6da1b2a7e7 refactor: Replace make_thing with make_thing_from_enum for consistency and clarity across multiple modules 2025-09-22 09:10:20 +07:00
MythEclipse acccae9f7c fix: Correct typo in FAILED_TESTS_SUMMARY variable and enhance HTTP status code handling in API tests 2025-09-22 08:21:21 +07:00
MythEclipse e7c17784cc feat: Simplify token generation by removing unnecessary permissions parameter from access and refresh token functions 2025-09-22 07:52:00 +07:00
Maulana SodiqinandGitHub 042e0b4eff Merge pull request #45 from IMPHNEN/feat/auth-google
Feat/auth google
2025-08-17 18:26:24 +07:00
MythEclipse 0b51a56dee feat: Enhance CORS middleware to dynamically include development port and allow OPTIONS method 2025-08-17 16:06:21 +07:00
MythEclipse cb98440b65 feat: Refactor update_user_avatar method to be static and enhance avatar deletion logic 2025-08-17 15:22:15 +07:00
MythEclipse 3c19d262f3 feat: Increase CSRF token maximum age to 30 minutes and enhance logging for token generation 2025-08-17 15:08:58 +07:00
MythEclipse bdffe85544 Update dependencies and refactor OAuth service
- Updated various dependencies in Cargo.toml to their latest versions for improved performance and security.
- Refactored the Google OAuth service to streamline the creation of the OAuth client and improve code readability.
- Changed the way WebSocket messages are sent in clear_db_test.rs to use `into()` for better type handling.
- Enhanced error handling and logging in the Google OAuth callback method.
2025-08-16 19:10:27 +07:00
MythEclipse 9ed619e3fd feat: Optimize password verification by using blocking tasks for improved performance 2025-08-16 13:47:29 +07:00
MythEclipse 00fd7e1907 feat: Refactor password hashing and JWT encoding to use static keys for improved performance and security 2025-08-16 13:43:18 +07:00
MythEclipse b70126734e feat: Refactor password reset flow to use async processing and improve token validation 2025-08-16 13:38:35 +07:00
MythEclipse 6af9461079 a 2025-08-16 13:22:39 +07:00
MythEclipse 57b3662951 feat: Refactor auth service and middleware for improved user data handling and caching 2025-08-16 13:18:55 +07:00
MythEclipse c0c08f2821 Enhance Users Service and DTOs
- Added Default trait to UsersDetailItemDto for easier instantiation.
- Refactored UsersServiceTrait to use Pin<Box<dyn Future<...>> for async functions, improving compatibility with async/await.
- Updated all service methods to return futures instead of using async_trait.
- Improved error handling and logging in upload_file method, ensuring proper handling of multipart data.
- Masked sensitive information in Env struct's Debug implementation for better security in logs.
- Cleaned up Cargo.toml by removing unnecessary async-trait workspace dependency.
2025-08-16 12:48:24 +07:00