|
|
@@ -366,15 +366,6 @@ $app->get('/homepage/overseerr/requests[/{type}[/{limit}[/{offset}]]]', function
|
|
|
->withHeader('Content-Type', 'application/json;charset=UTF-8')
|
|
|
->withStatus($GLOBALS['responseCode']);
|
|
|
});
|
|
|
-$app->post('/homepage/overseerr/requests/{type}/{id}[/{seasons}]', function ($request, $response, $args) {
|
|
|
- $Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
|
|
|
- $args['seasons'] = $args['seasons'] ?? null;
|
|
|
- $Organizr->addOverseerrRequest($args['id'], $args['type'], $args['seasons']);
|
|
|
- $response->getBody()->write(jsonE($GLOBALS['api']));
|
|
|
- return $response
|
|
|
- ->withHeader('Content-Type', 'application/json;charset=UTF-8')
|
|
|
- ->withStatus($GLOBALS['responseCode']);
|
|
|
-});
|
|
|
$app->post('/homepage/overseerr/requests/{type}/{id}/available', function ($request, $response, $args) {
|
|
|
$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
|
|
|
$Organizr->actionOverseerrRequest($args['id'], $args['type'], 'available');
|
|
|
@@ -423,6 +414,15 @@ $app->delete('/homepage/overseerr/requests/{type}/{id}', function ($request, $re
|
|
|
->withHeader('Content-Type', 'application/json;charset=UTF-8')
|
|
|
->withStatus($GLOBALS['responseCode']);
|
|
|
});
|
|
|
+$app->post('/homepage/overseerr/requests/{type}/{id}[/{seasons}]', function ($request, $response, $args) {
|
|
|
+ $Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
|
|
|
+ $args['seasons'] = $args['seasons'] ?? null;
|
|
|
+ $Organizr->addOverseerrRequest($args['id'], $args['type'], $args['seasons']);
|
|
|
+ $response->getBody()->write(jsonE($GLOBALS['api']));
|
|
|
+ return $response
|
|
|
+ ->withHeader('Content-Type', 'application/json;charset=UTF-8')
|
|
|
+ ->withStatus($GLOBALS['responseCode']);
|
|
|
+});
|
|
|
$app->get('/homepage/ombi/requests[/{type}[/{limit}[/{offset}]]]', function ($request, $response, $args) {
|
|
|
$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
|
|
|
$args['type'] = $args['type'] ?? 'both';
|