You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* initial commit
* fix-services-ooorequest-test
* fix-module-imports
* refactor: streamline OOO request handling and enhance validation
- Removed unnecessary checks for development mode and user roles in createOooRequestController.
- Improved documentation for acknowledgeOooRequest function to clarify parameters and return types.
- Added validation for request parameters in acknowledgeOooRequest middleware.
- Updated error handling in getRequestById to use a constant for not found messages.
- Cleaned up imports in requests model to remove unused constants.
* feat: enhance OOO request creation with user role validation
- Added role validation to ensure only users part of Discord can create OOO requests.
- Implemented a check for development mode to restrict access to the feature.
- Updated the controller to handle unauthorized access appropriately.
* fix-getRequestByID-function
* fix-validator-name
* refactor: remove redundant request constants from REQUEST_LOG_TYPE
* fix-ooo-models-condtions
* refactor: enhance OOO request handling and validation
- Updated createOooRequestController to use username instead of roles for user identification.
- Introduced conditionalOooChecks middleware to apply role and dev checks specifically for OOO requests.
- Improved validation error handling in acknowledgeOooRequest and added constants for error messages.
- Refactored request validation schemas for clarity and consistency.
- Cleaned up imports and ensured proper middleware usage in routes.
* refactor: update error handling in OOO request service
- Replaced BadRequest error with NotFound error in acknowledgeOooRequest for improved clarity.
- Removed unused import of NotFound from requests model to streamline code.
* fix/function-name
* fix/spaces
* refactor: simplify variable usage in acknowledgeOooRequest
- Removed redundant variable assignments for 'from', 'until', and 'requestedBy' in acknowledgeOooRequest function.
- Directly used the parameters in subsequent function calls to enhance code clarity and reduce unnecessary lines.
* refactor: rename acknowledgeOooRequest for consistency
- Updated the function name from acknowledgeOooRequest to acknowledgeOooRequestController for clarity and to align with naming conventions in the codebase.
- Adjusted import statements accordingly in the requests controller to reflect the new function name.
* refactor: update acknowledgeOooRequest to improve clarity and maintainability
- Added a TODO comment to indicate the need for future removal of legacy request format handling.
- Simplified the return structure by removing unnecessary data wrapping around requestResult.
* refactor: enhance type handling in acknowledgeOooRequest
- Updated requestData type assertion to include oldOooStatusRequest for better type safety.
- Removed legacy request format normalization logic to streamline the function and improve clarity.
* fix-nested-loop-refactor
* fix/change-conflict-to-badrequest
* refactor: improve oooRoleCheckMiddleware and oooRequests validation
- Enhanced the oooRoleCheckMiddleware for better error handling and code clarity.
- Updated the acknowledgeOooRequestValidator to include specific Joi validation error handling.
- Simplified the validateOooAcknowledgeRequest function by removing unnecessary try-catch nesting and improving logging for invalid request types.
* fix-jsdoc
* refactor: improve error handling and type safety in oooRequests
- Updated acknowledgeOooRequestController to remove unnecessary return statement.
- Enhanced acknowledgeOooRequestValidator to streamline Joi validation error handling.
- Improved type assertions in updateRequestValidator for better clarity and type safety.
- Refined transformRequestResponse logic to simplify request transformation based on environment conditions.
* feat: tests for OOO acknowledgement feature (#2474)
* initial commit
* added-more-test
* fix-test-title
* removed-try/catch-block
* fix-try-catch-cases
* added-try-catch
* removed-functon
* test: update assertions in oooRequest tests to use include for response validation
---------
Co-authored-by: Mayank Bansal <[email protected]>
---------
Co-authored-by: Mayank Bansal <[email protected]>
0 commit comments