Add ping route
This commit is contained in:
parent
bb116a68dd
commit
16ca407542
2 changed files with 13 additions and 0 deletions
11
app/controllers/ping_controller.rb
Normal file
11
app/controllers/ping_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class PingController < ApplicationController
|
||||
|
||||
def index
|
||||
if (ActiveRecord::Base.connected?)
|
||||
render nothing: true, status: 200, content_type: "application/json"
|
||||
else
|
||||
render nothing: true, status: 500, content_type: "application/json"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -1,5 +1,7 @@
|
|||
Rails.application.routes.draw do
|
||||
|
||||
get "/ping" => "ping#index", :constraints => {:ip => /127.0.0.1/}
|
||||
|
||||
devise_for :administrations, skip: [:password, :registrations]
|
||||
|
||||
devise_for :administrateurs, controllers: {
|
||||
|
|
Loading…
Add table
Reference in a new issue