@maioradv/cms-basic-lib 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +1 -0
- package/dist/client.js +3 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
package/dist/client.js
CHANGED
|
@@ -49,6 +49,9 @@ class MaiorCmsApiClient {
|
|
|
49
49
|
this.productVariants = new variants_1.default(this.client);
|
|
50
50
|
this.roles = new roles_1.default(this.client);
|
|
51
51
|
}
|
|
52
|
+
_setAccessToken(accessToken) {
|
|
53
|
+
this.client.defaults.headers.common[types_1.ApiHeader.Authorization] = `Bearer ${accessToken}`;
|
|
54
|
+
}
|
|
52
55
|
async auth() {
|
|
53
56
|
if (!this.configApi.credentials)
|
|
54
57
|
throw new error_1.AuthError('Missing credentials');
|