From db3ed0c6740c72de7eb505c10c855cfc00907751 Mon Sep 17 00:00:00 2001 From: Kevin Whittington Date: Tue, 10 Mar 2020 12:38:06 -0600 Subject: [PATCH] Return array from query function --- .../vue/src/main/webapp/app/entities/entity.service.ts.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 3d57cc48..07b8bd52 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,8 +33,8 @@ export default class <%= entityAngularName %>Service { }); } - public query(queryParams?: any<% if (pagination !== 'no') { %>, paginationQuery?: any<% } %>) : Promise> { - return new Promise>((resolve, reject) => { + 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); });