Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/services.template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) { -%>
Expand Down Expand Up @@ -529,7 +529,7 @@ action.description = '<em>\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');
});
Expand Down