fix typo in api_controller.rb