We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5d4d9f commit 7f6069dCopy full SHA for 7f6069d
1 file changed
app/controllers/api/v1/stats/dashboard_stats_controller.rb
@@ -6,19 +6,11 @@ module Stats
6
# Dashboard stats controller
7
class DashboardStatsController < ApiController
8
def index
9
- return render json: { status: :ok } if no_record?
10
-
11
render json: json_response, status: :ok
12
end
13
14
private
15
16
- def no_record?
17
- return true if current_user.dreams.empty? && current_user.nightmares.empty? && current_user.lucids.empty?
18
19
- false
20
- end
21
22
# Final json response for statistics
23
def json_response
24
{
0 commit comments