Merge pull request #2096 from santialbo/patch-5

(restangular) Fix argument order in custom methods
This commit is contained in:
John Reilly
2014-04-25 09:14:31 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ function test_basic() {
$scope.account = account.get({ single: true });
account.customPOST("messages", { param: "myParam" }, {}, { name: "My Message" })
account.customPOST({ name: "My Message" }, "messages", { param: "myParam" }, {})
}
function test_config() {

View File

@@ -60,8 +60,8 @@ interface RestangularCustom {
customGET(path: string, params?: any, headers?: any): ng.IPromise<any>;
customGETLIST(path: string, params?: any, headers?: any): ng.IPromise<any>;
customDELETE(path: string, params?: any, headers?: any): ng.IPromise<any>;
customPOST(path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
customPUT(path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
customPOST(elem?: any, path?: string, params?: any, headers?: any): ng.IPromise<any>;
customPUT(elem?: any, path?: string, params?: any, headers?: any): ng.IPromise<any>;
customOperation(operation: string, path: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
addRestangularMethod(name: string, operation: string, path?: string, params?: any, headers?: any, elem?: any): ng.IPromise<any>;
}