Change markers API to use a replica (#25851)

main
Eugen Rochko 2023-07-12 18:57:40 +02:00 committed by GitHub
parent fdc3ff7c2d
commit 8d0c69529a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,10 @@ class Api::V1::MarkersController < Api::BaseController
before_action :require_user!
def index
with_read_replica do
@markers = current_user.markers.where(timeline: Array(params[:timeline])).index_by(&:timeline)
end
render json: serialize_map(@markers)
end