Sefaria-Project
Sefaria-Project copied to clipboard
Feature/sc 28125/backend for sheets with ref
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.