闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
491 B

  1. # frozen_string_literal: true
  2. class ActivityPub::ClaimsController < ActivityPub::BaseController
  3. include SignatureVerification
  4. include AccountOwnedConcern
  5. skip_before_action :authenticate_user!
  6. before_action :require_signature!
  7. before_action :set_claim_result
  8. def create
  9. render json: @claim_result, serializer: ActivityPub::OneTimeKeySerializer
  10. end
  11. private
  12. def set_claim_result
  13. @claim_result = ::Keys::ClaimService.new.call(@account.id, params[:id])
  14. end
  15. end