File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
__tests__/app/create-letter-template
app/create-letter-template
tests/test-team/helpers/client Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ describe('CreateLetterTemplatePage', () => {
7474
7575 expect ( mockRedirect ) . toHaveBeenCalledWith (
7676 '/create-letter-template/client-id-and-campaign-id-required' ,
77- RedirectType . push
77+ RedirectType . replace
7878 ) ;
7979 } ) ;
8080
@@ -97,7 +97,7 @@ describe('CreateLetterTemplatePage', () => {
9797
9898 expect ( mockRedirect ) . toHaveBeenCalledWith (
9999 '/create-letter-template/client-id-and-campaign-id-required' ,
100- RedirectType . push
100+ RedirectType . replace
101101 ) ;
102102 } ) ;
103103} ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const CreateLetterTemplatePage = async () => {
1818 if ( ! accessToken || ! clientId )
1919 return redirect (
2020 '/create-letter-template/client-id-and-campaign-id-required' ,
21- RedirectType . push
21+ RedirectType . replace
2222 ) ;
2323
2424 const clientConfiguration = await fetchClient ( accessToken ) ;
@@ -28,7 +28,7 @@ const CreateLetterTemplatePage = async () => {
2828 if ( ! clientConfiguration || clientConfiguration . error || ! campaignId )
2929 return redirect (
3030 '/create-letter-template/client-id-and-campaign-id-required' ,
31- RedirectType . push
31+ RedirectType . replace
3232 ) ;
3333
3434 return < LetterTemplateForm initialState = { initialState } /> ;
Original file line number Diff line number Diff line change @@ -80,11 +80,13 @@ export class ClientConfigurationHelper {
8080 }
8181
8282 async teardown ( ids : string [ ] ) {
83- await this . ssmClient . send (
84- new DeleteParametersCommand ( {
85- Names : ids . map ( ( id ) => this . ssmKey ( id ) ) ,
86- } )
87- ) ;
83+ if ( ids . length ) {
84+ await this . ssmClient . send (
85+ new DeleteParametersCommand ( {
86+ Names : ids . map ( ( id ) => this . ssmKey ( id ) ) ,
87+ } )
88+ ) ;
89+ }
8890 }
8991
9092 private ssmKey ( clientId : string ) {
You can’t perform that action at this time.
0 commit comments