File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
lambdas/backend-api/src/templates/api Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -36,23 +36,24 @@ export const createHandler =
3636 scanResultStatus === 'NO_THREATS_FOUND' ? 'PASSED' : 'FAILED' ;
3737
3838 if ( virusScanResult === 'PASSED' ) {
39- await letterFileRepository . copyFromQuarantineToInternal (
40- objectKey ,
41- versionId ,
42- internalKey
43- ) ;
44-
4539 const downloadKey = LetterProofRepository . getDownloadKey (
4640 owner ,
4741 templateId ,
4842 fileName
4943 ) ;
5044
51- await letterFileRepository . copyFromQuarantineToDownload (
52- objectKey ,
53- versionId ,
54- downloadKey
55- ) ;
45+ await Promise . all ( [
46+ letterFileRepository . copyFromQuarantineToInternal (
47+ objectKey ,
48+ versionId ,
49+ internalKey
50+ ) ,
51+ letterFileRepository . copyFromQuarantineToDownload (
52+ objectKey ,
53+ versionId ,
54+ downloadKey
55+ ) ,
56+ ] ) ;
5657 } else {
5758 logger . error ( {
5859 description : 'File found that did not pass virus scan' ,
You can’t perform that action at this time.
0 commit comments