feat: add url and slug to collection #521

This commit is contained in:
vnmedeiros 2021-07-02 14:52:09 -03:00
parent 542baac6eb
commit 38a0198767
1 changed files with 4 additions and 0 deletions

View File

@ -636,6 +636,8 @@ class Items extends Repository {
$response[$metadata->get_id() . '_' . $collection->get_id()] = array( $response[$metadata->get_id() . '_' . $collection->get_id()] = array(
'collection_id' => $collection->get_id(), 'collection_id' => $collection->get_id(),
'collection_name' => $collection->get_name(), 'collection_name' => $collection->get_name(),
'url' => $collection->get_url(),
'slug' => $collection->get_slug(),
'metadata_id' => $metadata->get_id(), 'metadata_id' => $metadata->get_id(),
'metadata_name' => $metadata->get_name(), 'metadata_name' => $metadata->get_name(),
'total_items' => $related_items['found_posts'], 'total_items' => $related_items['found_posts'],
@ -649,6 +651,8 @@ class Items extends Repository {
$response[$metadata->get_id()] = array( $response[$metadata->get_id()] = array(
'collection_id' => $collection->get_id(), 'collection_id' => $collection->get_id(),
'collection_name' => $collection->get_name(), 'collection_name' => $collection->get_name(),
'url' => $collection->get_url(),
'slug' => $collection->get_slug(),
'metadata_id' => $metadata->get_id(), 'metadata_id' => $metadata->get_id(),
'metadata_name' => $metadata->get_name(), 'metadata_name' => $metadata->get_name(),
'total_items' => $related_items['found_posts'], 'total_items' => $related_items['found_posts'],