Formatting and a bug fix

This commit is contained in:
Jeremy Dormitzer 2018-10-21 09:41:07 -04:00
parent aa7338c042
commit 44f3117eaa
2 changed files with 7 additions and 2 deletions

View File

@ -188,7 +188,7 @@ function get_inbox( $actor_slug ) {
$actor_id
), ARRAY_A );
return \pterotype\collections\make_ordered_collection( array_map(
function ( $result ) {
function( $result ) {
return json_decode( $result['object'], true );
},
$results

View File

@ -32,7 +32,12 @@ function get_shares_collection( $object_id ) {
if ( !$shares ) {
$shares = array();
}
$collection = \pterotype\collections\make_ordered_collection( $shares );
$collection = \pterotype\collections\make_ordered_collection( array_map(
function( $result ) {
return json_decode( $result['object'], true );
},
$shares
) );
$collection['id'] = get_rest_url( null, sprintf(
'/pterotype/v1/object/%d/shares', $object_id
) );