add id and author to cdli-tablet feed
Contributes #2623
Description
- add
idandauthorfields to the/cdli-tablet/feedJSON response so consumers (notably the upcoming mobile app) can use the tablet id for navigation/bookmarking and display the author for attribution; both fields are additive, no existing keys are changed
Type of PR
- This PR is a feature.
Technicalities
- added
->contain(['Authors'])to the feed query inCdliTabletController::feed()so the relatedAuthoris eager-loaded in one query - added
'id' => $result->idand'author' => $result->author->authorto the full feed entry
Checklist:
- My pull request has a descriptive title (not a vague title like "Update
index.md"). - My pull request targets the
phoenix/developbranch of the repository. - My commit messages follow best practices.
- My code follows the established code style of the repository.
- I added tests for the changes I made (if applicable).
- I added or updated documentation (if applicable).
- I tried running the project locally and verified that there are no visible errors.
Edited by Shiva Gupta