Skip to content

Commit

Permalink
ON-40097 # Removed localKey property
Browse files Browse the repository at this point in the history
  • Loading branch information
mymattcarroll committed May 8, 2024
1 parent 06ff28c commit 77d2240
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions src/OneBlinkUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,11 @@ export default class OneBlinkUploader {
createdAt,
title,
lastElementUpdated,
localKey,
onProgress,
abortSignal,
}: UploadFormSubmissionOptions & {
/**
* The identifier of the draft that a new version should be created for. Set
* to `undefined` to create a new draft.
*/
formSubmissionDraftId?: string
/** The identifier used to store the draft locally for offline capability */
localKey: string
/** The identifier of the draft that a new version should be created for. */
formSubmissionDraftId: string
/**
* The date and time (in ISO format) when the draft data was saved by a
* user.
Expand All @@ -261,16 +255,13 @@ export default class OneBlinkUploader {
jobId,
})

let key = 'form-submission-drafts'
if (formSubmissionDraftId) {
key += `/${formSubmissionDraftId}`
}
tags.append('formSubmissionDraftId', formSubmissionDraftId)

return await uploadToS3<SubmissionTypes.FormSubmissionDraftVersion>({
...this,
contentType: 'application/json',
body: JSON.stringify(newS3SubmissionData),
key,
key: 'form-submission-draft-versions',
tags,
abortSignal,
onProgress,
Expand All @@ -283,9 +274,9 @@ export default class OneBlinkUploader {
taskGroupInstanceId,
jobId,
previousFormSubmissionApprovalId,
localKey,
createdAt,
title,
formSubmissionDraftId,
},
})
}
Expand Down

0 comments on commit 77d2240

Please sign in to comment.