You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a type error when defining GET route parameters for blog API endpoint:
// Current implementation causing error in src/app/(payload)/api/blogs/[id]/route.ts// Type "{ params: { id: string; }; }" is not valid for function's second argument`Type error: Route "src/app/(payload)/api/blogs/[id]/route.ts" has an invalid "GET" export:Type "{ params: { id: string; }; }" is not a valid type for the function's second argument.`Hereismycode:
<imgwidth="963"alt="Screenshot 2025-01-05 at 4 39 21 PM"src="https://github.com/user-attachments/assets/e03e934e-ed2e-447b-9f54-7dd49b3e2fa3"/>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Getting a type error when defining GET route parameters for blog API endpoint:
Beta Was this translation helpful? Give feedback.
All reactions