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

@@ -126,6 +126,8 @@ class Opalestate_Agent_Api extends Opalestate_Base_API {
$agents['agents'][ $i ] = $this->get_agent_data( $agent_info );
$i++;
}
} else {
return $this->get_response( 404, [ 'collection' => [], 'message' => esc_html__( 'Not found!', 'opalestate-pro' ) ] );
}
$response['collection'] = $agents['agents'];