diff options
author | Evan Minto <evan.minto@gmail.com> | 2017-02-06 01:19:05 -0800 |
---|---|---|
committer | Evan Minto <evan.minto@gmail.com> | 2017-02-06 01:19:26 -0800 |
commit | 94e213c6c11fb3476a6c151425052775427574e1 (patch) | |
tree | 93d3ef2c7c6d96801693e9268f24c481a2bb6af5 /app/controllers | |
parent | 8bd8ea7c0406a8eeb145471475b105366e195e6a (diff) |
Reuse existing controller and route
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/activitypub/accounts_controller.rb | 18 |
2 files changed, 2 insertions, 18 deletions
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 |