ngliferayservices-generator
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "ngliferayservices-generator", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Module to generate $http based services from liferay jsonws", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -910,12 +910,17 @@ (function(window, angular, $, Liferay, undefined) { | ||
R.get = function(key) { | ||
R.get = function(key, extraParams) { | ||
var deferred = $q.defer(), | ||
val = cache[key]; | ||
val = !extraParams && cache[key]; | ||
if (val) { | ||
deferred.resolve(val); | ||
} else { | ||
R._get(url + key, { | ||
var serializeExtraParams = extraParams ? angular.isArray(extraParams) ? extraParams.join("/") : extraParams : ""; | ||
R._get(url + key + "/" + serializeExtraParams, { | ||
p_auth: ngLiferayAuth.authToken | ||
}).then(function(val) { | ||
cache[key] = val; | ||
if (!extraParams) { | ||
cache[key] = val; | ||
} | ||
deferred.resolve(val); | ||
@@ -931,2 +936,3 @@ }); | ||
module | ||
@@ -933,0 +939,0 @@ .factory('ngLiferayAuth', function() { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48350
1089