File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,20 @@ function deleteSubmissionInit() {}
23
23
* @return {Action }
24
24
*/
25
25
function deleteSubmissionDone ( tokenV5 , submissionId ) {
26
- const submissionsService = getSubmissionService ( tokenV5 ) ;
27
- const filters = { legacySubmissionId : submissionId } ;
26
+ const submissionsService = getSubmissionService ( tokenV5 ) ;
27
+ const filters = { legacySubmissionId : submissionId } ;
28
28
29
- // from the legacy submissionId first get the GUID of the submission
30
- // and pass that id to the V5 api
31
- submissionsService . getSubmissions ( filters , { } )
32
- . then ( submissions => {
33
- if ( submissions . length === 0 ) {
34
- throw new Error ( `Submission ${ submissionId } does not exist.` ) ;
35
- }
36
- return getApi ( 'V5' , tokenV5 ) . delete ( `/submissions/${ submissions [ 0 ] . id } ` )
37
- . then ( res => ( res . ok ? submissionId : new Error ( res . statusText ) ) )
38
- . then ( res => res ) ;
39
- } ) ;
29
+ // from the legacy submissionId first get the GUID of the submission
30
+ // and pass that id to the V5 api
31
+ submissionsService . getSubmissions ( filters , { } )
32
+ . then ( ( submissions ) => {
33
+ if ( submissions . length === 0 ) {
34
+ throw new Error ( `Submission ${ submissionId } does not exist.` ) ;
35
+ }
36
+ return getApi ( 'V5' , tokenV5 ) . delete ( `/submissions/${ submissions [ 0 ] . id } ` )
37
+ . then ( res => ( res . ok ? submissionId : new Error ( res . statusText ) ) )
38
+ . then ( res => res ) ;
39
+ } ) ;
40
40
}
41
41
42
42
/**
You can’t perform that action at this time.
0 commit comments