mirror of
https://github.com/mastodon/mastodon
synced 2024-12-26 20:48:19 +09:00
19 lines
436 B
Ruby
19 lines
436 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ActivityPub::ClaimsController < ActivityPub::BaseController
|
|
skip_before_action :authenticate_user!
|
|
|
|
before_action :require_account_signature!
|
|
before_action :set_claim_result
|
|
|
|
def create
|
|
render json: @claim_result, serializer: ActivityPub::OneTimeKeySerializer
|
|
end
|
|
|
|
private
|
|
|
|
def set_claim_result
|
|
@claim_result = ::Keys::ClaimService.new.call(@account.id, params[:id])
|
|
end
|
|
end
|