@hzab/data-model 1.1.0 → 1.1.1
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/data-model.js +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/data-model.js
CHANGED
|
@@ -173,7 +173,7 @@ class DataModel {
|
|
|
173
173
|
}
|
|
174
174
|
const apiUrl = this.getApiUrl(this.createApi, _params, ctx, { from: "create" });
|
|
175
175
|
if (params instanceof FormData) {
|
|
176
|
-
opt.headers = { "Content-Type": "multipart/form-data" };
|
|
176
|
+
opt.headers = { ...(opt.headers ?? {}), "Content-Type": "multipart/form-data" };
|
|
177
177
|
_params = objToFormData(_params);
|
|
178
178
|
}
|
|
179
179
|
this.axios
|
|
@@ -203,7 +203,7 @@ class DataModel {
|
|
|
203
203
|
}
|
|
204
204
|
const apiUrl = this.getApiUrl(this.updateApi, _params, ctx, { from: "update" });
|
|
205
205
|
if (params instanceof FormData) {
|
|
206
|
-
opt.headers = { "Content-Type": "multipart/form-data" };
|
|
206
|
+
opt.headers = { ...(opt.headers ?? {}), "Content-Type": "multipart/form-data" };
|
|
207
207
|
_params = objToFormData(_params);
|
|
208
208
|
}
|
|
209
209
|
this.axios
|