From 898a09f1ba3f6ef74a9475b253e920140ca04840 Mon Sep 17 00:00:00 2001 From: Zack Yang Date: Fri, 10 Feb 2017 14:44:30 +0800 Subject: [PATCH 1/2] fix(bug): prevent overwrite headers for delete method --- src/component/restful.provider.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/component/restful.provider.js b/src/component/restful.provider.js index 3afaf7d..68e4885 100644 --- a/src/component/restful.provider.js +++ b/src/component/restful.provider.js @@ -88,9 +88,11 @@ class RestProvider { if (verb.match(/delete/)) { reqConfig.data = data; - reqConfig.headers = { - 'Content-Type': 'application/json' - }; + if (reqConfig.headers) { + reqConfig.headers['Content-Type'] = 'application/json'; + } else { + reqConfig.headers = { 'Content-Type': 'application/json' }; + } } args.push(reqConfig); From e6b9712ce362a98958550928e5bd55e588f0fd49 Mon Sep 17 00:00:00 2001 From: Zack Yang Date: Fri, 10 Feb 2017 06:47:23 +0000 Subject: [PATCH 2/2] v1.4.1 --- dist/sanji-rest-ui.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 dist/sanji-rest-ui.js diff --git a/dist/sanji-rest-ui.js b/dist/sanji-rest-ui.js new file mode 100644 index 0000000..c9d9a77 --- /dev/null +++ b/dist/sanji-rest-ui.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular"),require("ng-file-upload")):"function"==typeof define&&define.amd?define(["angular","ng-file-upload"],t):"object"==typeof exports?exports.sjRest=t(require("angular"),require("ng-file-upload")):e.sjRest=t(e.angular,e.ngFileUpload)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n (https://github.com/zack9433)", "description": "sanji-rest-ui UI", - "version": "0.0.0-semantic-released", + "version": "1.4.1", "main": "dist/sanji-rest-ui.js", "config": { "ghooks": {