@@ -73,7 +73,7 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
73
73
' LoopBackResource' , ' LoopBackAuth' , ' $injector' ,
74
74
function (Resource , LoopBackAuth , $injector ) {
75
75
var R = Resource (
76
- urlBase + < %- : meta .ctor .getFullPath () | q % > ,
76
+ urlBase + < %- : meta .ctor .getEndpoints ()[ 0 ]. fullPath | q % > ,
77
77
< % /*
78
78
Constructor arguments are hardcoded for now.
79
79
We should generate it from sharedCtor.accepts instead.
@@ -123,8 +123,8 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
123
123
< % }); // action.params.foreach -%>
124
124
},
125
125
< % } -% >
126
- url: urlBase + < %- : action .getFullPath () | q % > ,
127
- method: < %- : action .getHttpMethod () | q % > ,
126
+ url: urlBase + < %- : action .getEndpoints ()[ 0 ]. fullPath | q % > ,
127
+ method: < %- : action .getEndpoints ()[ 0 ]. verb | q % > ,
128
128
},
129
129
< % }); // meta.methods.foreach -%>
130
130
< % if (meta .isUser ) { -% >
@@ -529,7 +529,7 @@ action.description = '<em>\n' +
529
529
<%
530
530
var params = action.accepts;
531
531
var postData;
532
- if (action.getHttpMethod() == 'POST' || action.getHttpMethod() == 'PUT') {
532
+ if (action.getEndpoints()[0].verb == 'POST' || action.getEndpoints()[0].verb == 'PUT') {
533
533
params = params.filter(function(arg) {
534
534
return arg.http && (arg.http.source == 'query' || arg.http.source == 'path');
535
535
});
0 commit comments