Update API.

This commit is contained in:
Hoang Huu
2019-10-22 17:07:45 +07:00
parent b724789907
commit b8c6530801
10 changed files with 743 additions and 36 deletions

View File

@@ -130,6 +130,8 @@ class Opalestate_Agency_Api extends Opalestate_Base_API {
$agencies['agencies'][ $i ] = $this->get_agency_data( $agency_info );
$i++;
}
} else {
return $this->get_response( 404, [ 'collection' => [], 'message' => esc_html__( 'Not found!', 'opalestate-pro' ) ] );
}
$response['collection'] = $agencies['agencies'];