I'm starting to use Phoenix outside of tutorials for a small use case. So far great, but I'm a bit taken aback by the following.
I have a resource "recording" that I want to access at /api/recordings in JSON and at /recording with a template and the result being HTML.
Ideally the Ecto representation would be unique, and even part of the controller would also be shared?
Right now I either have to have 2 resources recordingAPI and recordingHTML, or 2 controllers and 1 resources.
Any exemple out there? I keep finding one or the other, but not something with the :api pipe and the :browser pipe used for the same resource.
Thanks