Skip to content

Commit 7f6069d

Browse files
committed
refactor: remove no_record? method and simplify index action in DashboardStatsController
1 parent f5d4d9f commit 7f6069d

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

app/controllers/api/v1/stats/dashboard_stats_controller.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@ module Stats
66
# Dashboard stats controller
77
class DashboardStatsController < ApiController
88
def index
9-
return render json: { status: :ok } if no_record?
10-
119
render json: json_response, status: :ok
1210
end
1311

1412
private
1513

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-
2214
# Final json response for statistics
2315
def json_response
2416
{

0 commit comments

Comments
 (0)