diff --git a/lib/services.template.ejs b/lib/services.template.ejs index 9a0ca31..c386d8e 100644 --- a/lib/services.template.ejs +++ b/lib/services.template.ejs @@ -73,7 +73,7 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' && 'LoopBackResource', 'LoopBackAuth', '$injector', function(Resource, LoopBackAuth, $injector) { var R = Resource( - urlBase + <%-: meta.ctor.getFullPath() | q %>, + urlBase + <%-: meta.ctor.getEndpoints()[0].fullPath | q %>, <% /* Constructor arguments are hardcoded for now. We should generate it from sharedCtor.accepts instead. @@ -123,8 +123,8 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' && <% }); //action.params.foreach -%> }, <% } -%> - url: urlBase + <%-: action.getFullPath() | q %>, - method: <%-: action.getHttpMethod() | q %>, + url: urlBase + <%-: action.getEndpoints()[0].fullPath | q %>, + method: <%-: action.getEndpoints()[0].verb | q %>, }, <% }); // meta.methods.foreach -%> <% if (meta.isUser) { -%> @@ -529,7 +529,7 @@ action.description = '\n' + <% var params = action.accepts; var postData; -if (action.getHttpMethod() == 'POST' || action.getHttpMethod() == 'PUT') { +if (action.getEndpoints()[0].verb == 'POST' || action.getEndpoints()[0].verb == 'PUT') { params = params.filter(function(arg) { return arg.http && (arg.http.source == 'query' || arg.http.source == 'path'); });