mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
9ede5905f6
refs #6103 - simplify `toJSON` - `baseKey` was not used - have not find a single use case - all the functionality of our `toJSON` is offered in bookshelf - `omitPivot` does remove pivot elements from the JSON obj (bookshelf feature) - `shallow` allows you to not return relations - make use of `serialize`, see http://bookshelfjs.org/docs/src_base_model.js.html#line260 - fetching nested relations e.g. `users.roles` still works (unrelated to this refactoring) > pick('shallow', 'baseKey', 'include', 'context') We will re-add options validation in https://github.com/TryGhost/Ghost/pull/9427, but then with the official way: use `filterOptions`. --- We return all fetched relations (pre-defined with `withRelated`) by default. You can disable it with `shallow:true`. |
||
---|---|---|
.. | ||
adapters | ||
api | ||
apps | ||
config | ||
controllers | ||
data | ||
helpers | ||
lib | ||
models | ||
public | ||
services | ||
translations | ||
views | ||
web | ||
analytics-events.js | ||
filters.js | ||
ghost-server.js | ||
index.js | ||
overrides.js | ||
update-check.js |