Skip to content

Commit

Permalink
Merge pull request #3 from danielgolf/hotfix/feed_performance
Browse files Browse the repository at this point in the history
Hotfix / Improve scores feed performance
  • Loading branch information
danielgolf authored Dec 9, 2022
2 parents b1b3a07 + f0e380c commit b3e6ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/scores_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ScoresController < ApplicationController
before_action :validate_score_user_id, only: :destroy

def user_feed
scores = Score.all.order(played_at: :desc, id: :desc)
scores = Score.includes(:user).order(played_at: :desc, id: :desc)
serialized_scores = scores.map(&:serialize)

response = {
Expand Down

0 comments on commit b3e6ef4

Please sign in to comment.