From 94e213c6c11fb3476a6c151425052775427574e1 Mon Sep 17 00:00:00 2001 From: Evan Minto Date: Mon, 6 Feb 2017 01:19:05 -0800 Subject: Reuse existing controller and route --- app/controllers/accounts_controller.rb | 2 ++ app/controllers/api/activitypub/accounts_controller.rb | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 app/controllers/api/activitypub/accounts_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 411a41ccc..b837f006e 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -18,6 +18,8 @@ class AccountsController < ApplicationController format.atom do @entries = @account.stream_entries.order('id desc').where(hidden: false).with_includes.paginate_by_max_id(20, params[:max_id], params[:since_id]) end + + format.activitystreams2 end end diff --git a/app/controllers/api/activitypub/accounts_controller.rb b/app/controllers/api/activitypub/accounts_controller.rb deleted file mode 100644 index 82936f062..000000000 --- a/app/controllers/api/activitypub/accounts_controller.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class Api::Activitypub::AccountsController < ApiController - before_action :set_account - - respond_to :'application/activity+json' - respond_to :'application/ld+json; profile="https://www.w3.org/ns/activitystreams#"' - - def show - render content_type: :'application/ld+json; profile="https://www.w3.org/ns/activitystreams#"' - end - - private - - def set_account - @account = Account.find(params[:id]) - end -end -- cgit