Sha256: b8d8585eaec2051d763445b1e982eacf1a0c3785941ca27688f0f98c889a5917
Contents?: true
Size: 659 Bytes
Versions: 48
Compression:
Stored size: 659 Bytes
Contents
module Api class OrganizationsController < BaseController include OrganizationsControllerTemplate before_action :authorize_janitor!, only: [:show, :index] before_action :authorize_admin!, only: [:update, :create] def index render json: { organizations: Organization.accessible_as(current_user, :janitor) } end def show render json: @organization.to_resource_h end def create @organization.save_and_notify! render json: @organization.to_resource_h end def update @organization.update_and_notify! organization_params render json: @organization.to_resource_h end end end
Version data entries
48 entries across 48 versions & 1 rubygems