Skip to content

Commit

Permalink
fix: change validation response condition and fix jsDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajjs committed Jan 22, 2025
1 parent 36ca944 commit f76bd41
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/onboardingExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const updateOnboardingExtensionRequestController = async (
body.newEndsOn,
)

if ('error' in validationResponse){
if (validationResponse){
if(validationResponse.error === REQUEST_DOES_NOT_EXIST){
return res.boom.notFound(validationResponse.error);
}
Expand Down
1 change: 0 additions & 1 deletion controllers/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export const getRequestsController = async (req: any, res: any) => {
* @param {CustomResponse} res - The response object.
* @returns {Promise<void>} Resolves or sends an error for invalid types.
*/

export const updateRequestBeforeAcknowledgedController = async (req: Request, res: CustomResponse) => {
const type = req.body.type;
switch(type){
Expand Down
2 changes: 1 addition & 1 deletion services/onboardingExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const validateOnboardingExtensionUpdateRequest = async (
/**
* Updates an onboarding extension request.
*
* @param {object} extensionRequestDoc - The extension request document.
* @param {string} id - The extension request document.
* @param {UpdateOnboardingExtensionRequestBody} body - New request details.
* @param {string} lastModifiedBy - ID of the user updating the request.
* @returns {Promise<object>} Updated request body.
Expand Down

0 comments on commit f76bd41

Please sign in to comment.