Sha256: 1729ce2b1c61ea5ab73e6a8c60b077dc14e48ee80766d9e95d9f6ffe374a1428

Contents?: true

Size: 890 Bytes

Versions: 2

Compression:

Stored size: 890 Bytes

Contents

# Health Check endpoint
module MnoEnterprise
  class StatusController < ApplicationController
    # Skip filters than rely on MnoHub (RemoteAuthenticatable)
    skip_before_filter :handle_password_change
    skip_before_filter :perform_return_to

    # Simple check to see that the app is up
    # Returns:
    #   {status: 'Ok'}
    def ping
      render json: {status: 'Ok'}
    end

    # Version check
    # Returns:
    #   {
    #     'app-version': '9061048-6811c4a',
    #     'mno-enterprise-version': '0.0.1',
    #     'env': 'test',
    #     'mno-api-host': 'https://uat.maestrano.io'
    #   }
    def version
      data = {
          'app-version' => MnoEnterprise::APP_VERSION,
          'mno-enteprise-version' => MnoEnterprise::VERSION,
          'env' => Rails.env,
          'mno-api-host' => MnoEnterprise.mno_api_host
      }
      render json: data
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mno-enterprise-api-3.4.0 app/controllers/mno_enterprise/status_controller.rb
mno-enterprise-api-3.3.3 app/controllers/mno_enterprise/status_controller.rb