Skip to content

Commit 5371a56

Browse files
committed
fix: environment names
1 parent 109b4a1 commit 5371a56

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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,

src/types/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Adapter } from './adapters';
22

3-
export type Environment = 'staging' | 'production';
3+
export type Environment = 'sandbox' | 'production';
44

55
export interface EQPOptions {
66
environment?: Environment;

0 commit comments

Comments
 (0)