Class: CtRegisterMicroservice::InfoController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ct_register_microservice/info_controller.rb

Instance Method Summary collapse

Instance Method Details

#infoObject



5
6
7
8
9
10
11
12
# File 'app/controllers/ct_register_microservice/info_controller.rb', line 5

def info
  if CtRegisterMicroservice.config.swagger and File.exist?(CtRegisterMicroservice.config.swagger)
    @docs = MultiJson.load(File.read(CtRegisterMicroservice.config.swagger))
    render json: @docs
  else
    render json: { success: false, message: 'Could not load info file' }, status: 500
  end
end

#pingObject



14
15
16
# File 'app/controllers/ct_register_microservice/info_controller.rb', line 14

def ping
  render json: { success: true, message: CtRegisterMicroservice.config.name }, status: 200
end