Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"url" field is undefined when restricting returned fields via the API #7089

Merged
merged 1 commit into from Jul 18, 2016
Merged

"url" field is undefined when restricting returned fields via the API #7089

merged 1 commit into from Jul 18, 2016

Commits on Jul 18, 2016

  1. Post url is constructed by loading properties additional properties

    - "url" and "author" fields depend on {id, published_at, slug, author_id} to construct post url.
    - implemented a generic solution by defining defaultColumnsToFetch() in
      base class for models.
    - findPage() calls defaultColumnsToFetch() before loading models
    - results are transformed by filtering out additional properties to return just the requested fields
    - Added a test case to check for url and author fields
    - Renamed allColumns as requestedColumns and used _.map instead of Promise.map
    vkandy committed Jul 18, 2016
    Copy the full SHA
    56c4928 View commit details
    Browse the repository at this point in the history