File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -149,29 +149,3 @@ window.axios.defaults.headers.common = {
149149 'X-Requested-With' : 'XMLHttpRequest' ,
150150 'X-CSRF-TOKEN' : Spark . csrfToken
151151} ;
152-
153- /**
154- * Intercept the incoming responses.
155- *
156- * Handle any unexpected HTTP errors and pop up modals, etc.
157- */
158- window . axios . interceptors . response . use ( function ( response ) {
159- return response ;
160- } , function ( error ) {
161- if ( error . response === undefined ) {
162- return Promise . reject ( error ) ;
163- }
164-
165- switch ( error . response . status ) {
166- case 401 :
167- window . axios . get ( '/logout' ) ;
168- $ ( '#modal-session-expired' ) . modal ( 'show' ) ;
169- break ;
170-
171- case 402 :
172- window . location = '/settings#/subscription' ;
173- break ;
174- }
175-
176- return Promise . reject ( error ) ;
177- } ) ;
You can’t perform that action at this time.
0 commit comments