Renamed API path for /backends/plex/ tp /plex to account for people naming their backend plex...
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\API\Backends\Plex;
|
||||
namespace App\API\Plex;
|
||||
|
||||
use App\Backends\Plex\PlexClient;
|
||||
use App\Libs\Attributes\Route\Post;
|
||||
@@ -14,13 +14,13 @@ use Symfony\Contracts\HttpClient\HttpClientInterface as iHttp;
|
||||
|
||||
final class Discover
|
||||
{
|
||||
public const string URL = '%{api.prefix}/backends/plex/discover';
|
||||
public const string URL = '%{api.prefix}/plex/discover';
|
||||
|
||||
public function __construct(private iHttp $http)
|
||||
{
|
||||
}
|
||||
|
||||
#[Post(self::URL . '[/]', name: 'backends.plex.discover')]
|
||||
#[Post(self::URL . '[/]', name: 'plex.discover')]
|
||||
public function plexDiscover(iRequest $request): iResponse
|
||||
{
|
||||
$data = DataUtil::fromArray($request->getParsedBody());
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\API\Backends\Plex;
|
||||
namespace App\API\Plex;
|
||||
|
||||
use App\Libs\Attributes\Route\Post;
|
||||
use App\Libs\DataUtil;
|
||||
@@ -17,13 +17,13 @@ final class GenerateAccessToken
|
||||
{
|
||||
use APITraits;
|
||||
|
||||
public const string URL = '%{api.prefix}/backends/plex/accesstoken';
|
||||
public const string URL = '%{api.prefix}/plex/accesstoken';
|
||||
|
||||
public function __construct(private iHttp $http)
|
||||
{
|
||||
}
|
||||
|
||||
#[Post(self::URL . '/{id:backend}[/]', name: 'backends.plex.accesstoken')]
|
||||
#[Post(self::URL . '/{id:backend}[/]', name: 'plex.accesstoken')]
|
||||
public function gAccesstoken(iRequest $request, array $args = []): iResponse
|
||||
{
|
||||
$backend = ag($args, 'id');
|
||||
Reference in New Issue
Block a user