Merge pull request #1356 from mlorb/ml-sci-remove-protocol-show-endpoint

Remove show protocol api endpoint
This commit is contained in:
mlorb 2018-10-30 14:04:17 +01:00 committed by GitHub
commit ad5f4c2ebb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View file

@ -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

View file

@ -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),