File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ export class XivapiService {
6565 queryParams = queryParams . set ( 'key' , this . apiKey ) ;
6666 }
6767 const baseUrl : string = options . staging ? XivapiService . STAGING_API_BASE_URL : XivapiService . API_BASE_URL ;
68+ if ( options . staging ) {
69+ queryParams = queryParams . delete ( 'staging' ) ;
70+ }
6871 return this . http . get < any > ( `${ baseUrl } /Search` , { params : queryParams } ) ;
6972 }
7073
@@ -188,10 +191,13 @@ export class XivapiService {
188191 }
189192
190193 protected request < T > ( endpoint : string , params ?: XivapiOptions ) : Observable < T > {
191- const queryParams : HttpParams = this . prepareQueryString ( params ) ;
194+ let queryParams : HttpParams = this . prepareQueryString ( params ) ;
192195 let baseUrl : string ;
193196 if ( params !== undefined ) {
194197 baseUrl = params . staging ? XivapiService . STAGING_API_BASE_URL : XivapiService . API_BASE_URL ;
198+ if ( params . staging ) {
199+ queryParams = queryParams . delete ( 'staging' ) ;
200+ }
195201 } else {
196202 baseUrl = XivapiService . API_BASE_URL ;
197203 }
You can’t perform that action at this time.
0 commit comments