docbrown/app/views/api/v0/shared/_listing.json.jbuilder
Spencer 6e2aab623e
API: Endpoint to get an organization's listings (#11823)
* add tests

* add route

* add controller action

* add jbuilder file

* update api docs

* update query

* update jbuilder listing

* add organization/user and category to listing

* update api docs/spec file
2020-12-18 12:20:35 -05:00

16 lines
298 B
Ruby

json.type_of "listing"
json.extract!(
listing,
:id,
:title,
:slug,
:body_markdown,
:category,
:processed_html,
:published,
)
json.listing_category_id listing.classified_listing_category_id
json.tag_list listing.cached_tag_list
json.tags listing.tag_list