Skip to content

Commit

Permalink
Merge pull request #70 from NYULibraries/chore/healthcheck
Browse files Browse the repository at this point in the history
Add healthcheck endpoint
  • Loading branch information
ericgriffis authored Sep 20, 2019
2 parents 83ba954 + 6fe10d1 commit 3ac49bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def is_in_admin_view
alias :is_in_admin_view? :is_in_admin_view
helper_method :is_in_admin_view?

def healthcheck
render json: {success: true}
return
end

protected

# Protect against SQL injection by forcing column to be an actual column name in the model
Expand Down
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@

get '/robots.txt' => 'application#robots'

get '/healthcheck' => 'application#healthcheck'

root :to => "users#new_registration"
end

0 comments on commit 3ac49bc

Please sign in to comment.