For /api/sheets/ref, passed parameter include_collections to get_sheets_for_ref, which in turn calls get_collections_with_sheets. This function returns every public collection that has a sheet in sheet_ids so that get_sheets_for_ref returns sheets with a collections field. Instead of including the whole collection, I include the name and slug only. I also added a 'dateCreated' field since on the front end, in the "Sheets With" page, each sheet entry displays a date.
For /api/sheets/ref, passed parameter include_collections to
get_sheets_for_ref
, which in turn callsget_collections_with_sheets
. This function returns every public collection that has a sheet insheet_ids
so thatget_sheets_for_ref
returns sheets with a collections field. Instead of including the whole collection, I include the name and slug only. I also added a 'dateCreated' field since on the front end, in the "Sheets With" page, each sheet entry displays a date.