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
feat: Add api to create onboarding extension request from discord server (#2307)
* fix:added onboarding type in request
* feat: added types for onboarding extension request
* feat: added validator and skip-authenticate middleware
* fix: added missing field in user type
* feat: added controller for handling the create onboarding extension request feature
* fix: remove requestedBy field because validation for super-users is done before hitting this api
* refactor: moved constant messages from controller
* fix: remove super-users validation check as it is done before making this api call
* fix: create newEndsOn from current date when deadline has missed
* fix: wrap schema validation logic in try-catch block
* chore: refactor varibale name for better readability
* chore: refactor new deadline calculation logic in a separate utils file for reuse
* chore: use utils function to calculate days to milliseconds
* feat: added utils function to validate date
* fix: return error response for invalid date
* fix: return forbidden response for non-onboarding user
* chore: added semicolon for consistent code practise
* chore: added jsDoc for functions and refactor import statment
* fix: import addLog from service file and fix lint issue
exportconstONBOARDING_REQUEST_CREATED_SUCCESSFULLY="Onboarding extension request created successfully"
59
+
exportconstUNAUTHORIZED_TO_CREATE_ONBOARDING_EXTENSION_REQUEST="Only super user and onboarding user are authorized to create an onboarding extension request"
0 commit comments