[feed manager] Gut the feed manager

This commit is contained in:
Fosco Marotto
2021-01-12 00:17:19 -05:00
parent 22ec66d07f
commit 5e6211a4f4
3 changed files with 20 additions and 141 deletions

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
class Api::V1::AccountByUsernameController < API::BaseController
class Api::V1::AccountByUsernameController < EmptyController
before_action :set_account
before_action :check_account_suspension
before_action :check_account_local

View File

@@ -42,7 +42,7 @@ class EmptyController < ActionController::Base
links << [prev_path, [%w(rel prev)]] if prev_path
response.headers['Link'] = LinkHeader.new(links) unless links.empty?
end
def current_user
nil
end
@@ -55,6 +55,10 @@ class EmptyController < ActionController::Base
nil
end
def gone
respond_with_error(410)
end
def cache_collection(raw, klass)
return raw unless klass.respond_to?(:with_includes)
@@ -83,6 +87,6 @@ class EmptyController < ActionController::Base
def truthy_param?(key)
ActiveModel::Type::Boolean.new.cast(params[key])
end
end