Skip to content

Commit

Permalink
chore: code format
Browse files Browse the repository at this point in the history
  • Loading branch information
eteubert committed Nov 17, 2024
1 parent e66a5ae commit 07f45a8
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions lib/modules/transcripts/rest_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
use Podlove\Modules\Contributors\Model\Contributor;
use Podlove\Modules\Transcripts\Model\Transcript;
use Podlove\Modules\Transcripts\Model\VoiceAssignment;
use WP_REST_Controller;
use WP_REST_Server;

class REST_API
{
Expand Down Expand Up @@ -91,7 +89,7 @@ public function permission_check()
}
}

class WP_REST_PodloveTranscripts_Controller extends WP_REST_Controller
class WP_REST_PodloveTranscripts_Controller extends \WP_REST_Controller
{
public function __construct()
{
Expand Down Expand Up @@ -124,7 +122,7 @@ public function register_routes()
'type' => 'string',
]
],
'methods' => WP_REST_Server::READABLE,
'methods' => \WP_REST_Server::READABLE,
'callback' => [$this, 'get_items'],
'permission_callback' => [$this, 'get_item_permissions_check'],
],
Expand All @@ -136,7 +134,7 @@ public function register_routes()
'required' => 'true'
]
],
'methods' => WP_REST_Server::CREATABLE,
'methods' => \WP_REST_Server::CREATABLE,
'callback' => [$this, 'create_item'],
'permission_callback' => [$this, 'create_item_permissions_check'],
],
Expand All @@ -148,12 +146,12 @@ public function register_routes()
'required' => 'true'
]
],
'methods' => WP_REST_Server::EDITABLE,
'methods' => \WP_REST_Server::EDITABLE,
'callback' => [$this, 'update_item'],
'permission_callback' => [$this, 'update_item_permissions_check'],
],
[
'methods' => WP_REST_Server::DELETABLE,
'methods' => \WP_REST_Server::DELETABLE,
'callback' => [$this, 'delete_item'],
'permission_callback' => [$this, 'delete_item_permissions_check'],
]
Expand All @@ -167,7 +165,7 @@ public function register_routes()
],
],
[
'methods' => WP_REST_Server::READABLE,
'methods' => \WP_REST_Server::READABLE,
'callback' => [$this, 'get_item_voices'],
'permission_callback' => [$this, 'get_item_permissions_check'],
],
Expand All @@ -182,7 +180,7 @@ public function register_routes()
'type' => 'integer',
]
],
'methods' => WP_REST_Server::EDITABLE,
'methods' => \WP_REST_Server::EDITABLE,
'callback' => [$this, 'update_item_voices'],
'permission_callback' => [$this, 'update_item_permissions_check'],
]
Expand Down Expand Up @@ -214,7 +212,7 @@ public function register_routes()
'type' => 'string',
]
],
'methods' => WP_REST_Server::READABLE,
'methods' => \WP_REST_Server::READABLE,
'callback' => [$this, 'get_item_transcripts'],
'permission_callback' => [$this, 'get_item_permissions_check'],
],
Expand All @@ -236,13 +234,13 @@ public function register_routes()
]
],
'description' => __('Edit a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
'methods' => WP_REST_Server::EDITABLE,
'methods' => \WP_REST_Server::EDITABLE,
'callback' => [$this, 'update_item_transcripts'],
'permission_callback' => [$this, 'update_item_permissions_check'],
],
[
'description' => __('Delete a chaption of the transcript', 'podlove-podcasting-plugin-for-wordpress'),
'methods' => WP_REST_Server::DELETABLE,
'methods' => \WP_REST_Server::DELETABLE,
'callback' => [$this, 'delete_item_transcripts'],
'permission_callback' => [$this, 'delete_item_permissions_check'],
]
Expand Down

0 comments on commit 07f45a8

Please sign in to comment.