mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Keep with_read_replica
in main action
This commit is contained in:
parent
f30e4b975c
commit
52b9e08bad
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,9 @@ class Api::V1::MarkersController < Api::BaseController
|
||||||
before_action :require_user!
|
before_action :require_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@markers = current_user_markers
|
with_read_replica do
|
||||||
|
@markers = current_user_markers
|
||||||
|
end
|
||||||
render json: marker_timeline_presenter, serializer: REST::MarkerTimelineSerializer
|
render json: marker_timeline_presenter, serializer: REST::MarkerTimelineSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -25,9 +27,7 @@ class Api::V1::MarkersController < Api::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_user_markers
|
def current_user_markers
|
||||||
with_read_replica do
|
current_user.markers.where(timeline: Array(params[:timeline]))
|
||||||
current_user.markers.where(timeline: Array(params[:timeline]))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_markers_from_params
|
def create_markers_from_params
|
||||||
|
|
Loading…
Reference in a new issue