We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db41d5f commit 6d091b6Copy full SHA for 6d091b6
app/controllers/health_controller.rb
@@ -14,12 +14,11 @@ def index
14
end
15
16
def gc
17
- verify_token_for_gc_stats
18
-
19
- render json: JSON.pretty_generate([
+ render body: JSON.pretty_generate([
20
Time.now.in_time_zone("Central Time (US & Canada)").strftime("%H"),
21
GC.stat
22
- ])
+ ]),
+ content_type: "application/json"
23
24
25
def case_contacts_creation_times_in_last_week
@@ -81,6 +80,8 @@ def monthly_unique_users_graph_data
81
80
private
82
83
def verify_token_for_gc_stats
84
- head :forbidden unless params[:token] == ENV.fetch("GC_ACCESS_TOKEN")
+ gc_access_token = ENV["GC_ACCESS_TOKEN"]
+
85
+ head :forbidden unless params[:token] == gc_access_token && !gc_access_token.nil?
86
87
0 commit comments