blob: 529a8311a1af0fa3934ec356092ba0cd5f72036b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
class Posts::WatchedsController < ApplicationController
before_action :require_user
before_action :setup_pagination_and_tags
skip_authorization_check
def show
@search = PostLoader.new(default_image_filter_options).search('my:watched')
@posts = @search.records
respond_to do |format|
format.html { redirect_to search_path(q: 'my:watched') }
format.rss { render layout: false }
format.json { render json: { images: @posts.map(&:as_json), interactions: (@interactions || []) } }
end
end
end
|