Class: Doctor::HealthCheckController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/doctor/health_check_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
# File 'app/controllers/doctor/health_check_controller.rb', line 3

def index
  check_result = HealthCheck.new.perform

  status = check_result.has_error? ? :internal_server_error : :ok

  render json: check_result.result, status: status
end