File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,14 @@ service.interceptors.request.use(config => {
151151 config . cancelToken = source . token
152152
153153 // Handle GET requests (params)
154+ handleGetRequestParams ( config )
155+
156+ handlePostRequestParams ( config )
157+
158+ return config
159+ } , err )
160+
161+ function handleGetRequestParams ( config ) {
154162 if ( config && config . params ) {
155163 config . params . response = 'json'
156164 const project = vueProps . $localStorage . get ( CURRENT_PROJECT )
@@ -162,11 +170,12 @@ service.interceptors.request.use(config => {
162170 }
163171 }
164172 if ( config . params . ignoreproject !== undefined ) {
165- config . params . ignoreproject = null
173+ delete config . params . ignoreproject
166174 }
167175 }
176+ }
168177
169- // Handle POST requests (data)
178+ function handlePostRequestParams ( config ) {
170179 if ( config && config . data && config . data instanceof URLSearchParams ) {
171180 const project = vueProps . $localStorage . get ( CURRENT_PROJECT )
172181 const command = config . data . get ( 'command' )
@@ -184,9 +193,7 @@ service.interceptors.request.use(config => {
184193 config . data . delete ( 'ignoreproject' )
185194 }
186195 }
187-
188- return config
189- } , err )
196+ }
190197
191198// response interceptor
192199service . interceptors . response . use ( ( response ) => {
You can’t perform that action at this time.
0 commit comments