Skip to content

Commit

Permalink
Changed the number of episodes in Castos Player block to 500 #1025
Browse files Browse the repository at this point in the history
  • Loading branch information
zahardev committed Jun 28, 2023
1 parent 2168a80 commit 48804dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions php/classes/rest/class-episodes-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,16 @@ public function get_collection_params() {

$params['context']['default'] = 'view';

$params['per_page'] = array (
'description' => 'Maximum number of items to be returned in result set.',
'type' => 'integer',
'default' => 10,
'minimum' => 1,
'maximum' => 500,
'sanitize_callback' => 'absint',
'validate_callback' => 'rest_validate_request_arg',
);

$params['after'] = array(
'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.' ),
'type' => 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditCastosHTMLPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EditCastosHTMLPlayer extends Component {

componentDidMount() {
this._isMounted = true;
let fetchPost = 'ssp/v1/episodes?per_page=100&get_additional_options=true';
let fetchPost = 'ssp/v1/episodes?per_page=500&get_additional_options=true';
apiFetch({path: fetchPost}).then(posts => {
let episodes = [];

Expand Down

0 comments on commit 48804dd

Please sign in to comment.