Skip to content

Commit f76bd41

Browse files
committed
fix: change validation response condition and fix jsDoc
1 parent 36ca944 commit f76bd41

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

controllers/onboardingExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export const updateOnboardingExtensionRequestController = async (
238238
body.newEndsOn,
239239
)
240240

241-
if ('error' in validationResponse){
241+
if (validationResponse){
242242
if(validationResponse.error === REQUEST_DOES_NOT_EXIST){
243243
return res.boom.notFound(validationResponse.error);
244244
}

controllers/requests.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export const getRequestsController = async (req: any, res: any) => {
114114
* @param {CustomResponse} res - The response object.
115115
* @returns {Promise<void>} Resolves or sends an error for invalid types.
116116
*/
117-
118117
export const updateRequestBeforeAcknowledgedController = async (req: Request, res: CustomResponse) => {
119118
const type = req.body.type;
120119
switch(type){

services/onboardingExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const validateOnboardingExtensionUpdateRequest = async (
9191
/**
9292
* Updates an onboarding extension request.
9393
*
94-
* @param {object} extensionRequestDoc - The extension request document.
94+
* @param {string} id - The extension request document.
9595
* @param {UpdateOnboardingExtensionRequestBody} body - New request details.
9696
* @param {string} lastModifiedBy - ID of the user updating the request.
9797
* @returns {Promise<object>} Updated request body.

0 commit comments

Comments
 (0)