Skip to content

Commit

Permalink
chore: limit post api return fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Feb 17, 2024
1 parent 4b131ae commit 6c1667e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/server/src/controller/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ module.exports = class extends BaseRest {
{ objectId: ['IN', resp.map(({ objectId }) => objectId)] },
);

return this.jsonOrSuccess(deprecated ? ret[0][type] : ret);
return this.jsonOrSuccess(
deprecated ? ret[0][type] : [{ [type]: ret[0][type] }],
);
}
};

0 comments on commit 6c1667e

Please sign in to comment.