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'
}


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

def version
  data = {
      'app-version' => MnoEnterprise::APP_VERSION,
      'mno-enteprise-version' => MnoEnterprise::VERSION,
      'env' => Rails.env
  }
  render json: data
end