With Next.js 13/14 server actions where introduced, which makes some endpoint declarations in pages/api/
obsolete.
What I’m not sure about: many of my endpoints are there for callbacks, e.g. in the authorization code flow when our oidc-provider returns a redirect (with a code to be exchanged for a JWT) towards a callback enpoint, and I even have a situation where an api endpoint is invoked by another service in the cluster without any preceeding action in my Next.js app. How can I convert these callback/endpoint handlers to server actions, or should I just leave them as they are, i.e. in a api
folder in an (almost) empty pages/
directory?