Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaotoday committed Oct 22, 2019
1 parent 8334e2a commit d030d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion src/extends/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']])) {
Expand Down

0 comments on commit d030d2d

Please sign in to comment.