Class: CtRegisterMicroservice::InfoController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CtRegisterMicroservice::InfoController
- Defined in:
- app/controllers/ct_register_microservice/info_controller.rb
Instance Method Summary collapse
Instance Method Details
#info ⇒ Object
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 |
#ping ⇒ Object
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 |