Skip to content

Commit

Permalink
type->filter + update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
irfan-dahir committed Oct 26, 2022
1 parent 2384989 commit 1331ed6
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions app/Http/Controllers/V4DB/SeasonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class SeasonController extends Controller
* @OA\Schema(type="string")
* ),
*
* @OA\Schema(
* schema="season_query_type",
* description="Available Anime types",
* type="string",
* enum={"tv","movie","ova","special","ona","music"}
* @OA\Parameter(
* name="filter",
* description="Entry types",
* in="query",
* @OA\Schema(type="string",enum={"tv","movie","ova","special","ona","music"})
* ),
*
* @OA\Parameter(ref="#/components/parameters/page"),
Expand Down Expand Up @@ -98,7 +98,7 @@ public function main(Request $request, ?int $year = null, ?string $season = null
$maxResultsPerPage = env('MAX_RESULTS_PER_PAGE', 30);
$page = $request->get('page') ?? 1;
$limit = $request->get('limit') ?? $maxResultsPerPage;
$type = $request->get('type');
$type = $request->get('filter');

if (!empty($limit)) {
$limit = (int) $limit;
Expand Down Expand Up @@ -240,7 +240,12 @@ public function archive(Request $request)
* operationId="getSeasonUpcoming",
* tags={"seasons"},
*
* @OA\Schema(ref="#/components/schemas/season_query_type"),
* @OA\Parameter(
* name="filter",
* description="Entry types",
* in="query",
* @OA\Schema(type="string",enum={"tv","movie","ova","special","ona","music"})
* ),
*
* @OA\Parameter(ref="#/components/parameters/page"),
*
Expand All @@ -263,7 +268,7 @@ public function later(Request $request)
$maxResultsPerPage = env('MAX_RESULTS_PER_PAGE', 30);
$page = $request->get('page') ?? 1;
$limit = $request->get('limit') ?? $maxResultsPerPage;
$type = $request->get('type');
$type = $request->get('filter');


if (!empty($limit)) {
Expand Down

0 comments on commit 1331ed6

Please sign in to comment.