ps-toolkit-ui 1.16.97 → 1.16.98

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.
@@ -2108,28 +2108,18 @@
2108
2108
  RequestClass.prototype.getClient = function (url, method, data, done, fail) {
2109
2109
  var _this = this;
2110
2110
  var token = HelperClass.getCookie('Authorization');
2111
- var settings;
2112
- if (data instanceof FormData) {
2113
- settings = {
2114
- url: this.environment.apiUrl + url,
2115
- method: exports.Method[method].toString(),
2116
- processData: false,
2117
- contentType: false,
2118
- data: data,
2119
- headers: token == null ? {} : { Authorization: token }
2120
- };
2121
- }
2122
- else {
2123
- // TODO const formData = this.jsonToFormData(data);
2124
- settings = {
2125
- url: this.environment.apiUrl + url,
2126
- method: exports.Method[method].toString(),
2127
- dataType: 'json',
2128
- contentType: 'application/json; charset=utf-8',
2129
- data: data !== null && data !== {} ? JSON.stringify(data, null, 2) : null,
2130
- headers: token == null ? {} : { Authorization: token, Accept: 'application/json' }
2131
- };
2132
- }
2111
+ if (!(data instanceof FormData)) {
2112
+ console.log(data);
2113
+ data = this.jsonToFormData(data);
2114
+ }
2115
+ var settings = {
2116
+ url: this.environment.apiUrl + url,
2117
+ method: exports.Method[method].toString(),
2118
+ processData: false,
2119
+ contentType: false,
2120
+ data: data,
2121
+ headers: token == null ? {} : { Authorization: token }
2122
+ };
2133
2123
  var request = $$1.ajax(settings);
2134
2124
  request.done(function (response) {
2135
2125
  if (!_this.environment.production) {