Migrating a POST route to the app router will look very familiar to the GET route that we already migrated.
Here we will covert our responses to return NextResponse
json
. All of the logic that was previously inside the API route is left the same.