mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 12:09:17 +08:00
remove show protocol api endpoint
This commit is contained in:
parent
c8d381a0a2
commit
0f8c80172e
2 changed files with 1 additions and 12 deletions
|
@ -7,7 +7,6 @@ module Api
|
||||||
before_action :load_project
|
before_action :load_project
|
||||||
before_action :load_experiment
|
before_action :load_experiment
|
||||||
before_action :load_task
|
before_action :load_task
|
||||||
before_action :load_protocol, only: :show
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
protocols = @task.protocols
|
protocols = @task.protocols
|
||||||
|
@ -18,10 +17,6 @@ module Api
|
||||||
each_serializer: ProtocolSerializer
|
each_serializer: ProtocolSerializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
|
||||||
render jsonapi: @protocol, serializer: ProtocolSerializer
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def load_team
|
def load_team
|
||||||
|
@ -46,12 +41,6 @@ module Api
|
||||||
def load_task
|
def load_task
|
||||||
@task = @experiment.my_modules.find(params.require(:task_id))
|
@task = @experiment.my_modules.find(params.require(:task_id))
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_protocol
|
|
||||||
@protocol = @task.protocols.find(
|
|
||||||
params.require(:id)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -581,7 +581,7 @@ Rails.application.routes.draw do
|
||||||
resources :task_inventory_items, only: %i(index show),
|
resources :task_inventory_items, only: %i(index show),
|
||||||
path: 'items',
|
path: 'items',
|
||||||
as: :items
|
as: :items
|
||||||
resources :task_users, only: %i(index show),
|
resources :task_users, only: %i(index),
|
||||||
path: 'users',
|
path: 'users',
|
||||||
as: :users
|
as: :users
|
||||||
resources :task_tags, only: %i(index show),
|
resources :task_tags, only: %i(index show),
|
||||||
|
|
Loading…
Reference in a new issue