diff --git a/app/controllers/api/abuses_controller.rb b/app/controllers/api/abuses_controller.rb index 7e6639eeb..4a7397b19 100644 --- a/app/controllers/api/abuses_controller.rb +++ b/app/controllers/api/abuses_controller.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +# API Controller for resources of type Abuse. +# Typical action is an user reporting an abuse on a project class API::AbusesController < API::ApiController before_action :authenticate_user!, except: :create diff --git a/app/controllers/api/admins_controller.rb b/app/controllers/api/admins_controller.rb index 2caad5661..50f1c0492 100644 --- a/app/controllers/api/admins_controller.rb +++ b/app/controllers/api/admins_controller.rb @@ -1,3 +1,6 @@ +# frozen_string_literal: true + +# API Controller for resources of type User with role 'admin'. class API::AdminsController < API::ApiController before_action :authenticate_user! diff --git a/app/controllers/api/age_ranges_controller.rb b/app/controllers/api/age_ranges_controller.rb index 03c3a5602..f8805e3f1 100644 --- a/app/controllers/api/age_ranges_controller.rb +++ b/app/controllers/api/age_ranges_controller.rb @@ -1,13 +1,16 @@ +# frozen_string_literal: true + +# API Controller for resources of type AgeRange +# AgeRange are used in Events class API::AgeRangesController < API::ApiController before_action :authenticate_user!, except: [:index] - before_action :set_age_range, only: [:show, :update, :destroy] + before_action :set_age_range, only: %i[show update destroy] def index @age_ranges = AgeRange.all end - def show - end + def show; end def create authorize AgeRange