Updated controller to call get_pre_return_action on every API call that returns data