diff --git a/app/controllers/api/v1/my_modules_controller.rb b/app/controllers/api/v1/tasks_controller.rb similarity index 98% rename from app/controllers/api/v1/my_modules_controller.rb rename to app/controllers/api/v1/tasks_controller.rb index 7a9e3e41a..710fa8684 100644 --- a/app/controllers/api/v1/my_modules_controller.rb +++ b/app/controllers/api/v1/tasks_controller.rb @@ -2,7 +2,7 @@ module Api module V1 - class MyModulesController < BaseController + class TasksController < BaseController before_action :load_team before_action :load_project before_action :load_experiment diff --git a/app/serializers/api/v1/task_serializer.rb b/app/serializers/api/v1/task_serializer.rb index 8e2aa9cf0..ba5461fd2 100644 --- a/app/serializers/api/v1/task_serializer.rb +++ b/app/serializers/api/v1/task_serializer.rb @@ -4,9 +4,7 @@ module Api module V1 class TaskSerializer < ActiveModel::Serializer type :tasks - attributes :id, :name, :due_date, :description, :state - attribute :my_module_group_id, key: :task_group_id - belongs_to :experiment, serializer: ExperimentSerializer + attributes :id, :name, :due_date, :description, :state, :archived end end end diff --git a/config/routes.rb b/config/routes.rb index a680fa919..a7dbee906 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -563,18 +563,9 @@ Rails.application.routes.draw do end resources :projects, only: %i(index show) do resources :experiments, only: %i(index show) do - resources :my_module_groups, - only: %i(index show), - path: 'task_groups', - as: :task_groups - resources :connections, - only: %i(index show), - path: 'connections', - as: :connections - resources :my_modules, - only: %i(index show), - path: 'tasks', - as: :tasks do + resources :task_groups, only: %i(index show) + resources :connections, only: %i(index show) + resources :tasks, only: %i(index show) do resources :my_module_repository_rows, only: %i(index show), path: 'task_inventory_rows', as: :task_inventory_rows