Skip to content

Commit 40da319

Browse files
committed
chore: bump version to 1.4.0
1 parent 108882a commit 40da319

4 files changed

Lines changed: 33 additions & 12 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apiNG",
3-
"version": "1.3.4",
3+
"version": "1.4.0",
44
"homepage": "https://github.com/JohnnyTheTank/apiNG",
55
"authors": [
66
"Jonathan Hornung <jonathan.hornung@gmail.com>"

dist/aping.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
@name: aping
3-
@version: 1.3.4 (21-06-2016)
3+
@version: 1.4.0 (27-06-2016)
44
@author: Jonathan Hornung <jonathan.hornung@gmail.com>
55
@url: https://github.com/JohnnyTheTank/apiNG
66
@license: MIT
@@ -748,6 +748,10 @@ angular.module("jtt_aping_jsonloader", [])
748748
if (angular.isDefined(request.orderReverse) && (request.orderReverse === true || request.orderReverse === 'true')) {
749749
request.orderReverse = true;
750750
}
751+
752+
if (angular.isDefined(request.xAuthToken)) {
753+
requestObject.xAuthToken = request.xAuthToken;
754+
}
751755
jsonloaderFactory.getJsonData(requestObject)
752756
.then(function (_data) {
753757
var resultArray = [];
@@ -801,12 +805,20 @@ angular.module("jtt_aping_jsonloader", [])
801805

802806
if (_requestObject.format === "jsonp") {
803807

808+
var httpObject = {
809+
method: 'GET',
810+
params: {callback: "JSON_CALLBACK"},
811+
};
812+
813+
if (angular.isDefined(_requestObject.xAuthToken)) {
814+
httpObject.headers = {
815+
'X-Auth-Token': _requestObject.xAuthToken
816+
}
817+
}
818+
804819
return $http.jsonp(
805820
_requestObject.path,
806-
{
807-
method: 'GET',
808-
params: {callback: "JSON_CALLBACK"},
809-
}
821+
httpObject
810822
);
811823

812824
/*
@@ -818,11 +830,20 @@ angular.module("jtt_aping_jsonloader", [])
818830
*/
819831

820832
} else {
821-
return $http({
833+
834+
var httpObject = {
822835
method: 'GET',
823836
url: _requestObject.path,
824-
params: params
825-
});
837+
params: params,
838+
};
839+
840+
if (angular.isDefined(_requestObject.xAuthToken)) {
841+
httpObject.headers = {
842+
'X-Auth-Token': _requestObject.xAuthToken
843+
}
844+
}
845+
846+
return $http(httpObject);
826847
}
827848
};
828849
return jsonloaderFactory;

dist/aping.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aping",
3-
"version": "1.3.4",
3+
"version": "1.4.0",
44
"description": "apiNG is an AngularJS directive that enables you to receive, aggregate, limit, order and display data from one or more sources. The complete setup is dead simple, just by adding data-attributes to your html",
55
"main": "dist/aping.js",
66
"repository": {

0 commit comments

Comments
 (0)