From 0f8c80172e195d2ee05fb451132c150f3fa4a4fd Mon Sep 17 00:00:00 2001 From: mlorb Date: Mon, 29 Oct 2018 11:21:48 +0100 Subject: [PATCH] remove show protocol api endpoint --- app/controllers/api/v1/protocols_controller.rb | 11 ----------- config/routes.rb | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/app/controllers/api/v1/protocols_controller.rb b/app/controllers/api/v1/protocols_controller.rb index f4cd1a8be..68785baef 100644 --- a/app/controllers/api/v1/protocols_controller.rb +++ b/app/controllers/api/v1/protocols_controller.rb @@ -7,7 +7,6 @@ module Api before_action :load_project before_action :load_experiment before_action :load_task - before_action :load_protocol, only: :show def index protocols = @task.protocols @@ -18,10 +17,6 @@ module Api each_serializer: ProtocolSerializer end - def show - render jsonapi: @protocol, serializer: ProtocolSerializer - end - private def load_team @@ -46,12 +41,6 @@ module Api def load_task @task = @experiment.my_modules.find(params.require(:task_id)) end - - def load_protocol - @protocol = @task.protocols.find( - params.require(:id) - ) - end end end end diff --git a/config/routes.rb b/config/routes.rb index 5795cf580..e171ed1d0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -581,7 +581,7 @@ Rails.application.routes.draw do resources :task_inventory_items, only: %i(index show), path: 'items', as: :items - resources :task_users, only: %i(index show), + resources :task_users, only: %i(index), path: 'users', as: :users resources :task_tags, only: %i(index show),