Added pattern matcher for backend name.
This commit is contained in:
@@ -52,7 +52,7 @@ final class Index
|
||||
return api_response(HTTP_STATUS::HTTP_OK, $response);
|
||||
}
|
||||
|
||||
#[Get(self::URL . '/{id:[a-zA-Z0-9_-]+}[/]', name: 'backends.view')]
|
||||
#[Get(self::URL . '/{id:backend}[/]', name: 'backends.view')]
|
||||
public function backendsView(iRequest $request, array $args = []): iResponse
|
||||
{
|
||||
if (null === ($id = ag($args, 'id'))) {
|
||||
|
||||
@@ -23,10 +23,10 @@ final class GenerateAccessToken
|
||||
{
|
||||
}
|
||||
|
||||
#[Post(self::URL . '/{backend:\w+}[/]', name: 'backends.plex.accesstoken')]
|
||||
#[Post(self::URL . '/{id:backend}[/]', name: 'backends.plex.accesstoken')]
|
||||
public function gAccesstoken(iRequest $request, array $args = []): iResponse
|
||||
{
|
||||
$backend = ag($args, 'backend');
|
||||
$backend = ag($args, 'id');
|
||||
|
||||
$data = DataUtil::fromArray($request->getParsedBody());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user