Skip to content

Commit

Permalink
Fix prepopulate call
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Dec 16, 2024
1 parent c335fc2 commit 0546b75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion functions/hrm/prepopulateForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,4 @@ export const prepopulateForm = async (
return contact;
};

export type PrepopulateForm = typeof prepopulateForm;
export type PrepopulateForm = { prepopulateForm: typeof prepopulateForm };
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export const handleEvent = async (
};

const prepopulatePath = Runtime.getFunctions()['hrm/prepopulateForm'].path;
const prepopulate = require(prepopulatePath) as PrepopulateForm;
await prepopulate(taskAttributes, contactForApi, formDefinitionsVersionUrl);
const { prepopulateForm } = require(prepopulatePath) as PrepopulateForm;
await prepopulateForm(taskAttributes, contactForApi, formDefinitionsVersionUrl);
const options: RequestInit = {
method: 'POST',
body: JSON.stringify(contactForApi),
Expand Down

0 comments on commit 0546b75

Please sign in to comment.