Skip to content

Commit

Permalink
expose optional validate param on exported method
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 27, 2023
1 parent 9c50287 commit 62bd968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/export/digitalPlanning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function generateDigitalPlanningPayload(

const passport = new Passport(session.data.passport);

const payload = validate
return validate
? new DigitalPlanning({
sessionId,
passport,
Expand All @@ -27,6 +27,4 @@ export async function generateDigitalPlanningPayload(
sessionId,
passport,
}).getPayloadWithoutValidation();

return payload;
}
3 changes: 2 additions & 1 deletion src/requests/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export class ExportClient {

digitalPlanningDataPayload(
sessionId: string,
validate?: boolean,
): Promise<DigitalPlanningDataSchema> {
return generateDigitalPlanningPayload(this.client, sessionId);
return generateDigitalPlanningPayload(this.client, sessionId, validate);
}
}

Expand Down

0 comments on commit 62bd968

Please sign in to comment.