Sefaria / Sefaria-Project

New Interfaces for Jewish Texts
https://www.sefaria.org
647 stars 265 forks source link

Feature/sc 28125/backend for sheets with ref #1940

Open stevekaplan123 opened 3 weeks ago

stevekaplan123 commented 3 weeks ago

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.