From 52b9e08bad0967414d1d07f8a242096d0f51fa87 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 3 May 2024 09:22:59 -0400 Subject: [PATCH] Keep `with_read_replica` in main action --- app/controllers/api/v1/markers_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/markers_controller.rb b/app/controllers/api/v1/markers_controller.rb index 53d4b939af4..dac77fa14ff 100644 --- a/app/controllers/api/v1/markers_controller.rb +++ b/app/controllers/api/v1/markers_controller.rb @@ -7,7 +7,9 @@ class Api::V1::MarkersController < Api::BaseController before_action :require_user! def index - @markers = current_user_markers + with_read_replica do + @markers = current_user_markers + end render json: marker_timeline_presenter, serializer: REST::MarkerTimelineSerializer end @@ -25,9 +27,7 @@ class Api::V1::MarkersController < Api::BaseController end def current_user_markers - with_read_replica do - current_user.markers.where(timeline: Array(params[:timeline])) - end + current_user.markers.where(timeline: Array(params[:timeline])) end def create_markers_from_params