Sha256: 5319c025037897b1e22bd57b79ccd47c73d0bc5931932a4c20a6d8b5e6f99cf3

Contents?: true

Size: 1001 Bytes

Versions: 18

Compression:

Stored size: 1001 Bytes

Contents

module ZuoraConnect
  class StaticController < ApplicationController
    before_filter :authenticate_connect_app_request, :except => [:metrics, :health, :session_error, :invalid_app_instance_error]
    after_filter :persist_connect_app_session,  :except => [:metrics, :health, :session_error, :invalid_app_instance_error]

    def session_error
      respond_to do |format|
        format.html
        format.json { render json: { message: "Session Error", status: 500 }, status: 500 }
      end
    end

    def invalid_app_instance_error
      respond_to do |format|
        format.html
        format.json {render json: { message: "Invalid App Instance", status: 500 }, status: 500 }
      end
    end

    def metrics
      type = params[:type].present? ? params[:type] : "versions"
      render json: ZuoraConnect::AppInstance.get_metrics(type).to_json, status: 200
    end

    def health
      render json: {
        message: "Alive",
        status: 200
      }, status: 200
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
zuora_connect-1.7.10 app/controllers/zuora_connect/static_controller.rb
zuora_connectD-1.7.09 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.09 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.08 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.07 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.06 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.05 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.04 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.03 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.02 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.01 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.7.0 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.06 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.05 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.04 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.03 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.02 app/controllers/zuora_connect/static_controller.rb
zuora_connect-1.6.01 app/controllers/zuora_connect/static_controller.rb