feat(schematics): add an condition for reponse type to service template

pull/5408/head
mehmet-erim 5 years ago
parent 789b230282
commit 6a1cba0ed4

@ -10,7 +10,9 @@ export class <%= name %>Service {
<%= camel(signature.name) %> = (<%= serializeParameters(signature.parameters) %>) =>
this.restService.request<<%= body.requestType %>, <%= body.responseType %>>({
method: '<%= body.method %>',
method: '<%= body.method %>',<%
if (body.responseType === 'string') { %>
responseType: 'text',<% } %>
url: `/<%= body.url %>`,<%
if (body.params.length) { %>
params: { <%= body.params.join(', ') %> },<% }

Loading…
Cancel
Save