Class: MnoEnterprise::StatusController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/mno_enterprise/status_controller.rb

Instance Method Summary collapse

Instance Method Details

#pingObject

Simple check to see that the app is up Returns:

{status: 'Ok'}


7
8
9
# File 'app/controllers/mno_enterprise/status_controller.rb', line 7

def ping
  render json: {status: 'Ok'}
end

#versionObject

Version check Returns:

{
  'app-version': '9061048-6811c4a',
  'mno-enterprise-version': '0.0.1',
  'env': 'test',
  'mno-api-host': 'https://uat.maestrano.io'
}


19
20
21
22
23
24
25
26
27
# File 'app/controllers/mno_enterprise/status_controller.rb', line 19

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