class ApiCorporateController < ApiController

  respond_to :json

  def feedback
    email = params[:email]
    body = params[:body]

    feedback = Feedback.new
    feedback.email = email
    feedback.body = body
    feedback.save

    if feedback.errors.any?
      response.status = :unprocessable_entity
      render :json => { :errors => feedback.errors }
    else
      render :json => {}, :status => :ok # an empty response, but 200 OK
    end
  end
end
