This backports the basic API setup being used for the beginnings of Hypremium. I've moved the API-specific overrides into the BaseApiController now, so no changes should be necessary to ApplicationController.
Something we may want to consider: should we version the base controller for the API as well (i.e. Api::V1::BaseApiController, Api::V2::BaseApiController)? Right now if any logic changes within the core base controller it will effect all versions of the API's endpoints. This is nice for making bug fixes across the board, but we have to be careful to only make behavior-dependent changes in the actual API controller subclasses.
This backports the basic API setup being used for the beginnings of Hypremium. I've moved the API-specific overrides into the BaseApiController now, so no changes should be necessary to ApplicationController.
Something we may want to consider: should we version the base controller for the API as well (i.e. Api::V1::BaseApiController, Api::V2::BaseApiController)? Right now if any logic changes within the core base controller it will effect all versions of the API's endpoints. This is nice for making bug fixes across the board, but we have to be careful to only make behavior-dependent changes in the actual API controller subclasses.