Formatting and a bug fix
This commit is contained in:
parent
aa7338c042
commit
44f3117eaa
@ -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
|
||||
|
@ -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
|
||||
) );
|
||||
|
Loading…
Reference in New Issue
Block a user