Sha256: e550d972231d51961388641a1b0884574da84feebc8ed18f41e5f6f29275c724

Contents?: true

Size: 564 Bytes

Versions: 2

Compression:

Stored size: 564 Bytes

Contents

module Federails
  module Server
    class FollowingsController < Federails::ServerController
      before_action :set_following, only: [:show]

      # GET /federation/actors/1/followings/1.json
      def show; end

      private

      # Use callbacks to share common setup or constraints between actions.
      def set_following
        actor = Actor.find_param(params[:actor_id])
        @following = Following.find_by!(actor: actor, uuid: params[:id])
        authorize @following, policy_class: Federails::Server::FollowingPolicy
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
federails-0.4.0 app/controllers/federails/server/followings_controller.rb
federails-0.3.0 app/controllers/federails/server/followings_controller.rb