1
0

claims_controller.rb 436 B

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