Skip to content

Commit 89171c2

Browse files
authored
Merge pull request #208 from OpenSourceOrg/fix/api-redirect-issues
revert back to name on the api
2 parents 742067b + 00932a9 commit 89171c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mu-plugins/osi-api/osi-api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function register_routes() {
4949
'callback' => array( $this, 'get_licenses' ),
5050
'permission_callback' => '__return_true',
5151
'args' => array(
52-
'id' => array(
52+
'name' => array(
5353
'required' => false,
5454
'type' => 'string',
5555
'description' => 'Filter by license name',
@@ -111,7 +111,7 @@ public function register_routes() {
111111
public function get_licenses( WP_REST_Request $data ) {
112112

113113
// Check if we have an ID passed.
114-
$searched_slug = $data->get_param( 'id' );
114+
$searched_slug = $data->get_param( 'name' );
115115

116116
// Check if we have any keyword passed.
117117
$keyword = $data->get_param( 'keyword' );

0 commit comments

Comments
 (0)