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 d04d9fa commit 8334e2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/extends/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ module.exports = app => {
* @private
*/
async _get (ctx) {
const { attributes, offset, limit, where, order } = app.$helpers.formatQuery(ctx.request.query)

if (ctx.params.id) {
ctx.send({
status: 200,
data: await this.service.find({ id: ctx.params.id })
data: await this.service.find({ id: ctx.params.id, attributes })
})
} else {
const { attributes, offset, limit, where, order } = app.$helpers.formatQuery(ctx.request.query)

ctx.send({
status: 200,
data: {
Expand Down

0 comments on commit 8334e2a

Please sign in to comment.