File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ export class EQP {
2929 }
3030
3131 constructor ( options : EQPOptions ) {
32+ options . environment ??= 'production' ;
33+
3234 this . adapter = new AuthenticatedAdapter (
33- options . adapter ??
34- new AxiosAdapter ( `https://developer${ ( options . environment ?? 'production' ) === 'staging' ? '-stg' : '' } -api.magento.com/rest/v1` ) ,
35+ options . adapter ?? new AxiosAdapter ( `https://commercedeveloper${ options . environment === 'sandbox' ? '-sandbox' : '' } -api.adobe.com/rest/v1` ) ,
3536 {
3637 appId : options . appId ,
3738 appSecret : options . appSecret ,
Original file line number Diff line number Diff line change 11import { Adapter } from './adapters' ;
22
3- export type Environment = 'staging ' | 'production' ;
3+ export type Environment = 'sandbox ' | 'production' ;
44
55export interface EQPOptions {
66 environment ?: Environment ;
You can’t perform that action at this time.
0 commit comments