mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 13:51:09 -05:00
Add park detail API and detail page implementation with loading states and error handling
This commit is contained in:
25
memory-bank/features/park_detail_api.md
Normal file
25
memory-bank/features/park_detail_api.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Park Detail API Implementation
|
||||
|
||||
## Overview
|
||||
Implementing the park detail API endpoint at `/api/parks/[slug]` to provide detailed information about a specific park.
|
||||
|
||||
## Implementation Details
|
||||
- Route: `/api/parks/[slug]/route.ts`
|
||||
- Response Type: `ParkDetailResponse` (already defined in api.ts)
|
||||
- Error Handling:
|
||||
- 404 for invalid park slugs
|
||||
- 500 for server/database errors
|
||||
|
||||
## Data Structure
|
||||
Reusing existing Park type with full relationships:
|
||||
- Basic park info (name, description, etc.)
|
||||
- Areas
|
||||
- Reviews with user info
|
||||
- Photos with user info
|
||||
- Creator details
|
||||
- Owner (company) details
|
||||
|
||||
## Date Formatting
|
||||
Following established pattern:
|
||||
- Split ISO dates at 'T' for date-only fields
|
||||
- Full ISO string for timestamps
|
||||
Reference in New Issue
Block a user