masto-fe/app/controllers/api/activitypub/notes_controller.rb
Evan Minto 66fd8e7821 ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
2017-04-23 05:21:10 +02:00

19 lines
333 B
Ruby

# frozen_string_literal: true
class Api::Activitypub::NotesController < ApiController
before_action :set_status
respond_to :activitystreams2
def show
headers['Access-Control-Allow-Origin'] = '*'
forbidden unless @status.permitted?
end
private
def set_status
@status = Status.find(params[:id])
end
end