@cpzxrobot/sdk 1.2.88 → 1.2.89
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/index.js +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -102,6 +102,7 @@ class Cpzxrobot {
|
|
|
102
102
|
const fetchWithAuth = async (input, init) => {
|
|
103
103
|
const headers = new Headers(init === null || init === void 0 ? void 0 : init.headers);
|
|
104
104
|
headers.set('Authorization', this.token);
|
|
105
|
+
headers.set('Miniapp-Code', this.appCode);
|
|
105
106
|
const response = await fetch(baseURL + input.toString(), Object.assign(Object.assign({}, init), { headers }));
|
|
106
107
|
if (!response.ok) {
|
|
107
108
|
throw new Error(`HTTP error! status: ${response.status}`);
|
package/index.ts
CHANGED
|
@@ -118,6 +118,7 @@ export class Cpzxrobot {
|
|
|
118
118
|
const fetchWithAuth = async (input: RequestInfo, init?: RequestInit) => {
|
|
119
119
|
const headers = new Headers(init?.headers);
|
|
120
120
|
headers.set('Authorization', this.token);
|
|
121
|
+
headers.set('Miniapp-Code', this.appCode);
|
|
121
122
|
const response = await fetch(baseURL + input.toString(), {
|
|
122
123
|
...init,
|
|
123
124
|
headers
|