mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 06:11:07 -05:00
feat: Add continent and park type fields to Park and ParkLocation models; update API filters and documentation
This commit is contained in:
@@ -212,13 +212,15 @@ The moderation system provides comprehensive content moderation, user management
|
||||
|
||||
### Parks Listing
|
||||
- **GET** `/api/v1/parks/`
|
||||
- **Query Parameters** (22 filtering parameters supported by Django backend):
|
||||
- **Query Parameters** (24 filtering parameters fully supported by Django backend):
|
||||
- `page` (int): Page number for pagination
|
||||
- `page_size` (int): Number of results per page
|
||||
- `search` (string): Search in park names and descriptions
|
||||
- `continent` (string): Filter by continent
|
||||
- `country` (string): Filter by country
|
||||
- `state` (string): Filter by state/province
|
||||
- `city` (string): Filter by city
|
||||
- `park_type` (string): Filter by park type (THEME_PARK, AMUSEMENT_PARK, WATER_PARK, etc.)
|
||||
- `status` (string): Filter by operational status
|
||||
- `operator_id` (int): Filter by operator company ID
|
||||
- `operator_slug` (string): Filter by operator company slug
|
||||
@@ -236,12 +238,6 @@ The moderation system provides comprehensive content moderation, user management
|
||||
- `max_roller_coaster_count` (int): Maximum roller coaster count
|
||||
- `ordering` (string): Order by fields (name, opening_date, ride_count, average_rating, coaster_count, etc.)
|
||||
|
||||
**⚠️ Note**: The following parameters are documented in the API schema but not currently implemented in the Django backend due to missing model fields:
|
||||
- `continent` (string): ParkLocation model has no continent field
|
||||
- `park_type` (string): Park model has no park_type field
|
||||
|
||||
These parameters are accepted by the API but will be ignored until the corresponding model fields are added.
|
||||
|
||||
### Filter Options
|
||||
- **GET** `/api/v1/parks/filter-options/`
|
||||
- **Returns**: Comprehensive filter options including continents, countries, states, park types, and ordering options
|
||||
|
||||
@@ -745,7 +745,6 @@ export const parksApi = {
|
||||
Object.entries(params).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
// Note: continent and park_type parameters are accepted but ignored by backend
|
||||
// due to missing model fields (ParkLocation has no continent, Park has no park_type)
|
||||
searchParams.append(key, value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -978,11 +978,8 @@ export interface ParkSearchFilters {
|
||||
min_roller_coaster_count?: number;
|
||||
max_roller_coaster_count?: number;
|
||||
ordering?: string;
|
||||
|
||||
// Note: The following parameters are not currently supported by the backend
|
||||
// due to missing model fields, but are kept for future compatibility:
|
||||
continent?: string; // ParkLocation model has no continent field
|
||||
park_type?: string; // Park model has no park_type field
|
||||
continent?: string;
|
||||
park_type?: string;
|
||||
}
|
||||
|
||||
export interface ParkCompanySearchResult {
|
||||
|
||||
Reference in New Issue
Block a user