From d030d2d098a8d7a4789d57f90dcd9c27bb2a7eca Mon Sep 17 00:00:00 2001 From: zhaojintian <729234283@qq.com> Date: Wed, 23 Oct 2019 04:28:17 +0800 Subject: [PATCH] update --- package.json | 2 +- src/extends/service.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 73202fb..d850546 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "less.js", - "version": "2.0.27", + "version": "2.0.28", "description": "A write less, do more MVC framework based on Koa.", "main": "src/index.js", "scripts": { diff --git a/src/extends/service.js b/src/extends/service.js index cafa411..5665d48 100644 --- a/src/extends/service.js +++ b/src/extends/service.js @@ -14,7 +14,8 @@ module.exports = app => { async find ({ id = '', attributes = null, offset = 0, limit = app.$config.PAGE_SIZE || 10, where = {}, order = [['id', 'DESC']] } = {}) { if (id) { return this.Model.findByPk(id, { - include: this.include + include: this.include, + attributes }) } else { if (this.hasOrder && JSON.stringify(order) === JSON.stringify([['id', 'DESC']])) {