-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-params.sh
More file actions
15 lines (10 loc) · 810 Bytes
/
fix-params.sh
File metadata and controls
15 lines (10 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# Fix Next.js 16 params changes in route handlers
# This script updates all route handlers to use Promise<{ id: string }> for params
echo "Fixing app/api/profile/skills/[id]/route.ts..."
sed -i '' 's/{ params }: { params: { id: string } }/{ params }: { params: Promise<{ id: string }> }/g' app/api/profile/skills/[id]/route.ts
echo "Fixing app/api/profile/educations/[id]/route.ts..."
sed -i '' 's/{ params }: { params: { id: string } }/{ params }: { params: Promise<{ id: string }> }/g' app/api/profile/educations/[id]/route.ts
echo "Fixing app/api/profile/work-experiences/[id]/route.ts..."
sed -i '' 's/{ params }: { params: { id: string } }/{ params }: { params: Promise<{ id: string }> }/g' app/api/profile/work-experiences/[id]/route.ts
echo "Done! Now updating params.id references..."