From 9ec91f4fc5b6e35825f7dd147b142beb99efd812 Mon Sep 17 00:00:00 2001 From: JHipster Bot Date: Sun, 1 Mar 2020 09:40:19 -0700 Subject: [PATCH] Use data-type instead of any --- .../main/webapp/app/entities/entity.service.ts.ejs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs index 08a22c05..3d57cc48 100755 --- a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs +++ b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs @@ -33,17 +33,17 @@ export default class <%= entityAngularName %>Service { }); } - public retrieve(<% if (pagination !== 'no') { %>paginationQuery?: any<% } %>) : Promise { - return new Promise((resolve, reject) => { - axios.get(baseApiUrl<% if (pagination !== 'no') { %> + `?${buildPaginationQueryOpts(paginationQuery)}` <% } %>).then(function (res) { - resolve(res); + public query(queryParams?: any<% if (pagination !== 'no') { %>, paginationQuery?: any<% } %>) : Promise> { + return new Promise>((resolve, reject) => { + axios.get(`${baseApiUrl}?${buildQueryParams(queryParams)}`<% if (pagination !== 'no') { %> + `&${buildPaginationQueryOpts(paginationQuery)}` <% } %>).then(function (res) { + resolve(res.data); }).catch(err => { reject(err); }); }); } - public query(queryParams?: any<% if (pagination !== 'no') { %>, paginationQuery?: any<% } %>) : Promise { + public retrieve(<% if (pagination !== 'no') { %>paginationQuery?: any<% } %>) : Promise { return new Promise((resolve, reject) => { - axios.get(`${baseApiUrl}?${buildQueryParams(queryParams)}`<% if (pagination !== 'no') { %> + `&${buildPaginationQueryOpts(paginationQuery)}` <% } %>).then(function (res) { + axios.get(baseApiUrl<% if (pagination !== 'no') { %> + `?${buildPaginationQueryOpts(paginationQuery)}` <% } %>).then(function (res) { resolve(res); }).catch(err => { reject(err); }); });