Create a Next.js Route Handler with proper HTTP methods and error handling.
# Generate Next.js API Route Create a Next.js Route Handler with proper HTTP methods and error handling. ## Arguments - `$ARGUMENTS` - API route path and methods (e.g., "posts with GET, POST, PUT, DELETE") ## Instructions Create a Route Handler based on the provided path and methods: 1. **Analyze Requirements** - Parse route path from `$ARGUMENTS` - Identify required HTTP methods - Determine if route is dynamic ([id], [slug]) - Check if authentication is needed 2. **Implementation** - Create route.ts in app/api directory - Implement requested HTTP methods - Add pr...