I want to propose a BaseApi, which will handle querying of data:
fun <T> dbQuery(block: () -> T): T
Currently, this is handled in BaseController. See this line.
By doing this, Controller won't be concerned about transactions and 'how' the data is fetched. That part will be the API duty to provide the requested data.
I can make a PR for this.