Cleanup

Extract logic that was contained inside of the render_POST method out into
methods on the resource class or free functions.